# amazon-associate

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

Latest version **0.3.1** (published 2013-12-09) · 0 weekly downloads

## Install

```sh
npm install amazon-associate
pnpm add amazon-associate
yarn add amazon-associate
bun add amazon-associate
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.3.1 |
| Published | 2013-12-09 |
| First published | 2012-06-27 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=0.8.5 |
| Dependencies | 3 |
| Known vulnerabilities | 0 (+5 in 2 direct dependencies) |
| Install scripts | no |
| GitHub stars | 43 |
| Author | Maximilian Krüger |
| Maintainers | snd |
| Keywords | amazon, associate, report |

## Links

- npm: https://www.npmjs.com/package/amazon-associate
- Repository: https://github.com/snd/amazon-associate
- Homepage: http://github.com/snd/amazon-associate
- Issues: http://github.com/snd/amazon-associate/issues
- npm.io page: https://npm.io/package/amazon-associate

## Dependencies (3)

- [sax](https://npm.io/package/sax.md) 0.5.5
- [moment](https://npm.io/package/moment.md) 2.1.0
- [underscore](https://npm.io/package/underscore.md) 1.5.1

## Recent versions

- 0.3.1 (latest) — 2013-12-09
- 0.3.0 — 2013-09-04
- 0.2.0 — 2012-09-27
- 0.1.2 — 2012-06-27
- 0.1.1 — 2012-06-27
- 0.1.0 — 2012-06-27

## README

# amazon-associate

[![Build Status](https://travis-ci.org/snd/amazon-associate.png)](https://travis-ci.org/snd/amazon-associate)

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

### install

```
npm install amazon-associate
```

### use

```javascript
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)` calls `cb` with the earnings of the given date.
    each earning has the properties:
    - `asin` [amazon standard identification number](http://en.wikipedia.org/wiki/Amazon_Standard_Identification_Number) of the product
    - `category` id of the category of the product
    - `date` date in a format like `September 25, 2012`
    - `edate` date as posix time
    - `earnings` amount that was earned for the associate program
    - `linktype`
    - `price` price of the product
    - `qty` quantity that was bought of the product
    - `rate` percentage of the earnings on the price
    - `revenue`
    - `seller` name of the product's seller
    - `subtag` subtag used in the affiliate link
    - `tag` associate id
    - `title` title of the product
- `getOrders(date, cb)` calls `cb` with the orders of the given date.
    each order has the properties:
    - `asin` [amazon standard identification number](http://en.wikipedia.org/wiki/Amazon_Standard_Identification_Number) of the product
    - `category` id of the category of the product
    - `clicks`
    - `conversion`
    - `dqty`
    - `date` date in a format like `September 25, 2012`
    - `linktype`
    - `nqty`
    - `price` price of the product
    - `qty` quantity that was bought of the product
    - `subtag` subtag used in the affiliate link
    - `tag` associate id
    - `title` title of the product

### license: MIT

---
_Source: https://npm.io/package/amazon-associate · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
