Skip to content
This repository has been archived by the owner on Feb 6, 2024. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
feat: add get-service-status example
  • Loading branch information
justinemmanuelmercado authored and moltar committed Jun 28, 2020
1 parent 105277b commit ec9dc3b
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions examples/get-service-status.ts
@@ -0,0 +1,44 @@
// eslint-disable-next-line eslint-comments/disable-enable-pair
/* eslint-disable @typescript-eslint/no-unused-vars */
/**
* import from 'amazon-mws-api-sdk'
*/
import { amazonMarketplaces, HttpClient, MWSOptions, Sellers } from '../src'

/**
* Configure the HttpClient
*/

const mwsOptions: MWSOptions = {
marketplace: amazonMarketplaces.US,
awsAccessKeyId: '',
mwsAuthToken: '',
sellerId: '',
secretKey: '',
}

const http = new HttpClient(mwsOptions)

/**
* Configure which API you need
* Sellers, Orders, Fulfillment Inventory, Products, Reports, Subscriptions, Finances, Feeds
*/
const sellers = new Sellers(http)

/**
* Get service status of the Sellers API
*/
const main = async () => {
/**
* Returns a tuple containing
* [0] Actual response data in JS object format
* [1] Metadata of the request
*/
const [serviceStatus, requestMeta] = await sellers.getServiceStatus()

/**
* Check out Amazon's official docs for other available endpoints
* http://docs.developer.amazonservices.com/en_CA/dev_guide/index.html
* Under the folder API References
*/
}

0 comments on commit ec9dc3b

Please sign in to comment.