amazon-associate is a simple interface to amazon associate reports for nodejs
npm install amazon-associate
Amazon = require 'amazon-associate'
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), (err, earnings) ->
throw err if err?
console.log earnings
getEarnings(date, cb)
callscb
of the earnings of the given date. each earning has the following properties:asin
that is the amazon standard identification number of the productcategory
that is the id of the category of the productdate
that is the date in a format likeSeptember 25, 2012
edate
that is the date as posix timeearnings
that is the amount that was earned for the associate programlinktype
price
that is the price of the productqty
that is the quantity that was bought of the productrate
that is the percentage of the earnings on the pricerevenue
seller
that is the name of the product's sellersubtag
that is the subtag used in the affiliate linktag
that is the associate idtitle
that is the title of the product
getOrders(date, cb)
callscb
of the orders of the given date. each order has the following properties:asin
that is the amazon standard identification number of the productcategory
that is the id of the category of the productclicks
conversion
dqty
date
that is the date in a format likeSeptember 25, 2012
linktype
nqty
price
that is the price of the productqty
that is the quantity that was bought of the productsubtag
that is the subtag used in the affiliate linktag
that is the associate idtitle
that is the title of the product