Skip to content

amazon-associate is a simple interface to amazon associate reports for nodejs

License

Notifications You must be signed in to change notification settings

iamsophie/amazon-associate

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

amazon-associate

Build Status

amazon-associate is a simple interface to amazon associate reports for nodejs

install

npm install amazon-associate

use

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

api

  • getEarnings(date, cb) calls cb of the earnings of the given date. each earning has the following properties:
    • asin that is the amazon standard identification number of the product
    • category that is the id of the category of the product
    • date that is the date in a format like September 25, 2012
    • edate that is the date as posix time
    • earnings that is the amount that was earned for the associate program
    • linktype
    • price that is the price of the product
    • qty that is the quantity that was bought of the product
    • rate that is the percentage of the earnings on the price
    • revenue
    • seller that is the name of the product's seller
    • subtag that is the subtag used in the affiliate link
    • tag that is the associate id
    • title that is the title of the product
  • getOrders(date, cb) calls cb of the orders of the given date. each order has the following properties:
    • asin that is the amazon standard identification number of the product
    • category that is the id of the category of the product
    • clicks
    • conversion
    • dqty
    • date that is the date in a format like September 25, 2012
    • linktype
    • nqty
    • price that is the price of the product
    • qty that is the quantity that was bought of the product
    • subtag that is the subtag used in the affiliate link
    • tag that is the associate id
    • title that is the title of the product

license: MIT

About

amazon-associate is a simple interface to amazon associate reports for nodejs

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published