amazon-associate-ts
v0.3.0
Published
Amazon associate rebuilt with Typescript
Maintainers
Readme
amazon-associate-ts
Rebuilt of v0.3.0 of this repository in typescript
Since it was not really being maintained I decided to rebuild it in TypeScript to make it more easily extendable and safer.
amazon-associate is a simple interface to amazon associate reports for nodejs
install
npm install amazon-associateuse
var Amazon = require('amazon-associate');
var amazon = new Amazon({
associateId: 'your amazon associate id',
password: 'your password',
host: 'assoc-datafeeds-na.amazon.com', // (default 'assoc-datafeeds-eu.amazon.com')
debug: true // print debug output to the console (optional)
})
amazon.getEarnings(new Date(2012, 5, 22), function(err, earnings) {
if (err) {
throw err;
}
console.log(earnings);
});api
getEarnings(date, cb)callscbwith the earnings of the given date. each earning has the properties:asinamazon standard identification number of the productcategoryid of the category of the productdatedate in a format likeSeptember 25, 2012edatedate as posix timeearningsamount that was earned for the associate programlinktypepriceprice of the productqtyquantity that was bought of the productratepercentage of the earnings on the pricerevenuesellername of the product's sellersubtagsubtag used in the affiliate linktagassociate idtitletitle of the product
getOrders(date, cb)callscbwith the orders of the given date. each order has the properties:asinamazon standard identification number of the productcategoryid of the category of the productclicksconversiondqtydatedate in a format likeSeptember 25, 2012linktypenqtypriceprice of the productqtyquantity that was bought of the productsubtagsubtag used in the affiliate linktagassociate idtitletitle of the product

