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-associate
use
var Amazon = ; var 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;
api
getEarnings(date, cb)
callscb
with the earnings of the given date. each earning has the properties:asin
amazon standard identification number of the productcategory
id of the category of the productdate
date in a format likeSeptember 25, 2012
edate
date as posix timeearnings
amount that was earned for the associate programlinktype
price
price of the productqty
quantity that was bought of the productrate
percentage of the earnings on the pricerevenue
seller
name of the product's sellersubtag
subtag used in the affiliate linktag
associate idtitle
title of the product
getOrders(date, cb)
callscb
with the orders of the given date. each order has the properties:asin
amazon standard identification number of the productcategory
id of the category of the productclicks
conversion
dqty
date
date in a format likeSeptember 25, 2012
linktype
nqty
price
price of the productqty
quantity that was bought of the productsubtag
subtag used in the affiliate linktag
associate idtitle
title of the product