📦 @scaleleap/amazon-advertising-api-sdk

Amazon Advertising API TypeScript and Node.js Unofficial SDK

Install
npm i -s @scaleleap/amazon-advertising-api-sdk
Documentation
Usage
OAuth Client
Inherits from, and implements similar interface to client-oauth2
package.
import { OAuthClient } from '@scaleleap/amazon-advertising-api-sdk'
const client = new OAuthClient({
clientId: '...',
clientSecret: '...',
redirectUri: '...',
})
const uri = client.getUri()
const token = client.getToken()
const token = client.createToken('... access token ...', '... refresh token ...')
const res = await token.refresh()
API Operations
The library is split into "operations", which are closely mapped to the operations (sections) of the
API.
import { HttpClient, OperationProvider, ProfileOperation } from '@scaleleap/amazon-advertising-api-sdk'
const httpClient = new HttpClient('https://advertising-api.amazon.com', auth)
const operationProvider = new OperationProvider(httpClient)
const profileOperation = operationProvider.create(ProfileOperation)
const res = await profileOperation.listProfiles()
Authors or Acknowledgments
License
This project is licensed under the MIT License.
