codeswholesale-node-sdk
Node wrapper with promises for codeswholesale API
Installation
$ npm install codeswholesale-node-sdk --save
Usage
const cws = ; // Configurecws; // Get all productscws ;
API
configure (options)
Set-up credentials and URL for your requests. You can pass the sandbox or live URL to codeswholesale APIs to properly work in dev or production.
cws;
products
Get all products.
cws ;
product (productId)
Get details for a product.
let productId = '1234-2345-556-4566'; // example cws productproductId ;
account
Get all details about your current account.
cws ;
order (productId, quantity)
Create an order (buy key/keys). You can buy one or more keys for the same product by passing a different quantity. Currently you must pass the quantity but for future releases it will be handled with a default value of 1.
let productId = '1234-2345-556-4566'; // example cws ;
License
MIT © Mircea Pop