Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
mws-api-extended
Advanced tools
Readme
Amazon MWS Node.js modules are a mess. This project is based on multiple projects from this.
Promise based. Only compatible with Node ^4.0.0. (unless someone adds a babel precompilation step)
Supports throttling and pagification. (NextToken stuff)
Installation:
npm i mws-api -S
Initialization:
const MWSClient = require('mws-api');
const mws = new MWSClient({
accessKeyId: 'lol',
secretAccessKey: 'kek',
merchantId: 'hue',
meta: {
retry: true, // retry requests when throttled
next: true, // auto-paginate
limit: Infinity // only get this number of items (NOT the same as MaxRequestsPerPage)
}
});
For other countries, also set the host
parameter, according to the MarketPlaceId
you are using, otherwise it leads to AccessDenied
error. For example:
...
const mws = new MWSClient({
host: 'mws.amazonservices.co.uk', // .de, .es, .fr, .it, etc
...
}
Usage:
mws.Orders.ListOrders({
MarketplaceId: 'lel',
MaxResultsPerPage: 10,
CreatedAfter: new Date(1,1,2015),
CreatedBefore: new Date(1,2,2015)
})
.then(({ result, metadata }) => {
// result
});
Flat files:
When working with a flat-file response from Amazon, a parseCSVResult
function is provided as an
option to conviniently post-process the result. Returning a Promise will result in the Promise being resolved.
// An example to change the encoding of the raw response
const iconv = require('iconv-lite');
const MWSClient = require('mws-api');
const mws = new MWSClient({
accessKeyId: 'lol',
secretAccessKey: 'kek',
merchantId: 'hue',
meta: {
parseCSVResult: (data) => iconv.encode(data, 'utf-8').toString()
}
});
FAQs
Amazon Marketplace Web Services API client
The npm package mws-api-extended receives a total of 3 weekly downloads. As such, mws-api-extended popularity was classified as not popular.
We found that mws-api-extended 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
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.