imws
Originally forked from vedmalex/mws-sdk.
Why forked?
The response object made by xml2js
is
- So looooooong
- Un-clean
~~~~
- Hard to track ...00.aa444
- Tired to access =>.=>.=>.=>
What is done:
- I fix it with better response format!!!
Installation
$ npm i -S imws
Examples
Initialize
var MWS = client = 'accessKeyId' 'secretAccessKey' 'merchantId' // target mws host. Default: 'mws.amazonservices.com' host: MWSEndpointjp // Optional Auth Token when using delegated Developer access. authToken: 'amzn.mws...' // request options (https://github.com/request/request#requestoptions-callback) requestOpts: proxy: 'http://PROXY_HOST:PROXY_PORT' encoding: null MarketplaceId = "ATVPDKIKX0DER";
now you can use it
{ var req = MWSOrdersrequests; req; req; req; req; req; req; req; req; req; req; req; return client;}// or you can do like this { var req = MWSOrdersrequests; req; return client;}
Use it.
var date = ;// convert to clean JS Object;
Tests
- Fill in the values for
env.sh
and run tests:
cd cloneOfThisProject
. ./env.sh
npm test
- To see more logs while running tests, choose from:
NODE_DEBUG=request npm test
NODE_ENV=development npm test
NODE_ENV=development NODE_DEBUG=request npm test