Security News
The Unpaid Backbone of Open Source: Solo Maintainers Face Increasing Security Demands
Solo open source maintainers face burnout and security challenges, with 60% unpaid and 60% considering quitting.
amazon-ppc-api
Advanced tools
let AdvertisingClient = require('amz-advertising-api');
let client = new AdvertisingClient({
clientId: "CLIENT_ID",
clientSecret: "CLIENT_SECRET",
accessToken: "ACCESS_TOKEN",
refreshToken: "REFRESH_TOKEN",
profileId: "PROFILE_ID",
sandbox: false,
region: 'eu'
});
await client.init();
The refresh token gets automaticly refreshed every 2 minutes.
{
"access_token": "Atza|IQEBLjAsAhRmHjNgHpi0U-Dme37rR6CuUpSR…",
"expires_in": 3600
}
client.options.profileId = "1234567890";
Once you've set the profile Id you are ready to start making API calls.
List Profiles
let profiles = await client.listProfiles();
[
{
"profileId":1234567890,
"countryCode":"US",
"currencyCode":"USD",
"dailyBudget":10.00,
"timezone":"America/Los_Angeles",
"accountInfo":{
"marketplaceStringId":"ABC123",
"sellerStringId":"DEF456"
}
}
]
Retrieves a single profile by Id.
await client.getProfile("1234567890");
{
"profileId": 1234567890,
"countryCode": "US",
"currencyCode": "USD",
"dailyBudget": 3.99,
"timezone": "America/Los_Angeles",
"accountInfo": {
"marketplaceStringId": "ABC123",
"sellerStringId": "DEF456"
}
}
listPortfolios(filter: {}, extended: false).
Accepts first argument as filter, and the second argument to list for extended details or not.
await client.listPortfolios();
[
{
"portfolioId": 1234567890,
"name": "Portfolio Name",
"budget": { },
"inBudget": true,
"state": "enabled"
}
]
getPortfolio(portfolioId, extended: false).
Accepts first argument as the portfolioId, and the second argument for extended details or not.
await client.getPortfolio(portfolioId);
{
"portfolioId": 1234567890,
"name": "Portfolio Name",
"budget": { },
"inBudget": true,
"state": "enabled",
"creationDate": 202-0101,
"lastUpdatedDate": 20210101
}
FAQs
This class helps you interfacing the Amazon Advertising API.
The npm package amazon-ppc-api receives a total of 19 weekly downloads. As such, amazon-ppc-api popularity was classified as not popular.
We found that amazon-ppc-api 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
Solo open source maintainers face burnout and security challenges, with 60% unpaid and 60% considering quitting.
Security News
License exceptions modify the terms of open source licenses, impacting how software can be used, modified, and distributed. Developers should be aware of the legal implications of these exceptions.
Security News
A developer is accusing Tencent of violating the GPL by modifying a Python utility and changing its license to BSD, highlighting the importance of copyleft compliance.