Security News
RubyGems.org Adds New Maintainer Role
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Amazon Marketplace Web Services client with support for all api calls, using ES6 Promises with clever output.
Originally forked from vedmalex/mws-sdk.
The response object made by xml2js
is
~~~~
$ npm i -S imws
Initialize
var MWS = require('imws'),
client = new MWS.Client(
'accessKeyId',
'secretAccessKey',
'merchantId',
{
// target mws host. Default: 'mws.amazonservices.com'
host: MWS.Endpoint.jp,
// 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
function getListOrders(client, args) {
var req = MWS.Orders.requests.ListOrders();
req.set('CreatedAfter', args.CreatedAfter);
req.set('CreatedBefore', args.CreatedBefore);
req.set('LastUpdatedAfter', args.LastUpdatedAfter);
req.set('MarketplaceId', args.MarketplaceId);
req.set('LastUpdatedBefore', args.LastUpdatedBefore);
req.set('OrderStatus', args.OrderStatus);
req.set('FulfillmentChannel', args.FulfillmentChannel);
req.set('PaymentMethod', args.PaymentMethod);
req.set('BuyerEmail', args.BuyerEmail);
req.set('SellerOrderId', args.SellerOrderId);
req.set('MaxResultsPerPage', args.MaxResultsPerPage);
return client.invoke(req);
}
// or you can do like this
function getListOrders(client, args) {
var req = MWS.Orders.requests.ListOrders();
req.set(args);
return client.invoke(req);
}
Use it.
var date = new Date();
getListOrders(client, {
MarketplaceId: MarketplaceId,
MaxResultsPerPage: 10,
CreatedAfter: new Date(2015, 1, 1),
CreatedBefore: new Date(2015, 1, 31)
})
// convert to clean JS Object
.then(MWS.Orders.responses.ListOrders)
.catch(function(error) {
console.error(error);
})
.then(function(RESULT){
console.log("--------");
console.log(JSON.stringify(RESULT));
console.log("--------");
});
env.sh
and run tests:cd cloneOfThisProject
. ./env.sh
npm test
NODE_DEBUG=request npm test
NODE_ENV=development npm test
NODE_ENV=development NODE_DEBUG=request npm test
FAQs
Amazon Marketplace Web Services client with support for all api calls, using ES6 Promises with clever output.
The npm package imws receives a total of 2 weekly downloads. As such, imws popularity was classified as not popular.
We found that imws demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.
Security News
Research
Socket's threat research team has detected five malicious npm packages targeting Roblox developers, deploying malware to steal credentials and personal data.