Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
6848516
huge overhaul
Oct 23, 2012
44adb34
FBA Complex Updates
Dec 6, 2012
8399ac7
Total rewrite + modifications
Dec 12, 2012
07c828d
Fix locale parameter of MWSClient being ignored
zaro Feb 14, 2013
5432072
Fix inconsisten behaviour of .getNext for NextToken calls
zaro Feb 14, 2013
8014af7
Fix passing bool arguments with false values, ignored by default by …
zaro Feb 15, 2013
72a4141
Fix MWSEnum ignoring members passed to the constructor
zaro Feb 15, 2013
d55ac0d
Add option to MWSClient.invoke, to use the HasNext instead of the Nex…
zaro Feb 15, 2013
e9aa0ee
Add options to specify expected content-type, needed fot the GetRepor…
zaro Feb 15, 2013
b083011
Reports API usually returns errors with 'text/plain' instead of 'text…
zaro Feb 15, 2013
f17104c
Implement Reports API with a simple client
zaro Feb 15, 2013
ee64d14
Return errors similar to the Amazon API errors in the case of Wrong M…
zaro Feb 15, 2013
8966130
Use binary transfer encoding, prevents MD5 errors on reports which co…
zaro Feb 15, 2013
0c15076
Add simple reports client example
zaro Feb 15, 2013
be937f1
Add some example usages to the Reports Client
zaro Feb 15, 2013
63caa82
Specify explicitly xml2js version, as later version break compatibility
zaro Feb 19, 2013
1a9d14e
Fix GetMatchingProduct parameters in products client and implement…
zaro Feb 24, 2013
7bb370e
Products client was taking marketplaceIds as parameterlist, and all t…
zaro Feb 28, 2013
399c0d4
use this.md5Calc in MWSReques.attach , global one is not defined anyw…
zaro Mar 25, 2013
bc6f63c
Pass a copy of invokeOptios to getNext call, for getNextToken calls, …
zaro Mar 25, 2013
05b2b0f
Add .gitignore for test/
zaro Mar 25, 2013
9fcf952
Add a sample config for the tests
zaro Apr 14, 2013
50e04c6
Updated readme, and made a working products api example
zaro Apr 14, 2013
88dcdf7
Core, FBA, and Reports js new functions
Swiddow May 28, 2013
535ed6b
Updated ReadMe, Additions to Products, Bugfixes
Swiddow Jun 11, 2013
6eed8b3
Fix: MWS_ORDERS to MWS_FEEDS
devfacet Jun 27, 2013
ce2468e
Merge pull request #1 from cmfatih/master
Swiddow Jun 27, 2013
4ce67f6
invalid reference to undefined var options(.required) instead of defi…
benighted Aug 29, 2013
eb2e213
invalid reference to undefined var options(.required) instead of defi…
benighted Aug 29, 2013
8edbedb
added missing quotes around string
benighted Aug 29, 2013
0e5949f
corrected feed enum values
benighted Aug 30, 2013
68a245e
added feeds api test
benighted Sep 1, 2013
ca15d44
fixed problem with rendering MWSEnumList values
benighted Sep 1, 2013
eab433b
eliminated some duplicate definitions of enum values
benighted Sep 1, 2013
70bf2e1
added handling for content-type of application/octet-stream
benighted Sep 2, 2013
569c6f6
removed racial slur
benighted Sep 2, 2013
ef007cb
updating coffee script for commit 88dcdf7149e2cb0e186dd56fe460672abbc…
benighted Sep 2, 2013
546c2a2
updating coffeescript for commit 535ed6b1ae590e1db5305a3b0e753df36d32…
benighted Sep 2, 2013
acc85f9
updated readme
benighted Sep 2, 2013
1277ba5
Update README.md
benighted Sep 2, 2013
bf5441f
Merge pull request #2 from benighted/master
Swiddow Sep 5, 2013
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file removed README
Empty file.
68 changes: 43 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,36 +1,54 @@
mws-js
======

I find Node.js an absolute pleasure to work with and made this rough
Marketplace web services client as one of my first projects. I still find it
beats the snot out of PHP, Java, or C# packages Amazon publishes.
I use it for real-time integration and/or dashboards for e-commerce clients.
Note: there may be tons of bugs since I updated the formatting to be a lot
more user-friendly, but almost all of the documented functions and objects
should work fine and dandy like cotton candy.
Complete Amazon marketplace web services client for Node.js. This project is still a work in progress, not all interfaces are fully tested and working.

Usage
=====

Super simple example
--------------------
config
------
```javascript
loginInfo = {
locale: 'US',
merchantId: 'XXXXXXX',
marketplaceId: 'XXXXXXX',
accessKeyId: 'XXXXXXX',
secretAccessKey: 'XXXXX'
}

I will be creating some sample projects illustrating how to take advantage
of complex/enum params and other more useful features of this library, but
the most basic usage I could come up with goes something like:
```

.js Example
-------------
Fetching a product info:
```javascript
var mws = require('mws'),
client = new AmazonMwsClient('accessKeyId', 'secretAccessKey', 'merchantId', {});

// Get the service status of Sellers API endpoint and print it
client.invoke(new mws.sellers.requests.GetServiceStatus(), console.log);

var listOrders = new mws.orders.requests.ListOrders();
listOrders.set('MarketplaceId', 'marketplaceId')
.set('CreatedAfter', new Date(2,14,2012));
client.invoke(listOrders, function(result) {
console.log(result);
// Do something fun with the results...
var mws = require('mws-js');
var client = new mws.products.Client(loginInfo);

client.getMatchingProductForId('ASIN', 'B005ISQ7JC', function(res){
if (res.error) {
console.error(res.error);
} else if (res.result) {
console.log(res.result);
}
});
```

```

Coffee Script example
--------------
Fetching a product info:
```
mws = require equire 'mws-js'
client = new mws.products.Client(loginInfo)

client.getMatchingProductForId 'ASIN', ASIN_ID , (res) =>
if res.error
console.error res.error
else if res.result
console.log util.inspect(res.result,false,10)

```

You can have a look at test directory for more examples.
15 changes: 15 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// Pull in our core mws-js module
var mws = require('./lib/core');

// Pull in each of the the individual API modules
mws.fba = require('./lib/fba');
mws.feeds = require('./lib/feeds');
mws.orders = require('./lib/orders');
mws.products = require('./lib/products');
mws.reports = require('./lib/reports');
mws.sellers = require('./lib/sellers');

module.exports = mws

// var util = require('util');
// console.log(util.inspect(mws));
Loading