shopwave-oauth-client
A basic shopwave oauth client for node.js . This API allows users to authenticate against Shopwave OAUTH Server. It also has support for API calls, that can be used to get user data & make other GET/POST api calls.
Installation
$ npm install shopwave-oauth-client
Examples
Here is an example on how to use it:
OAuth
var { var config = authServerUrl : "http://secure.merchantstack.com" clientUrl : "http://your.site.url.here" apiServerUrl : "http://shopwave-api-url-here" clientId : "*****your clientId here*******" clientSecret : "*****your clientSecret here***" ; reqoAuthClient = oAuthClient; reqoAuthClient; }
GET API CALLS
- Get products
//optional header params. var options = productIds : 123466 active: true deleted: false storeId: 1 reqoAuthClient;
- Get User
- Get Basket
- Get Status
- Get Merchant
- Get Category
- Get Store
- Get Promotion
- Get PromotionCode
- Get BasketReport
- Get Log
POST API CALLS
- Post Product
var options = null;var requestParams = "products": "0": "id": "18" "name": "Earl Grey Brewed Tea" "details": "Earl Grey includes some of the world" "price": "107.5" "barcode": "75645464655" "vatPercentage": "0.20" reqoAuthClient;