The sain-apigw-selcom
package provides a convenient way to interact with Selcom API. Register at selcom to get you apikey
, secretKey
and whitelist your server. This gateway is embeded with mock response. This enables you to use the http://example.local/v1
as your testing endpoint.
- Node.js version 10.13 or higher
- npm version 6.4 or higher
- Interact with Selcom API
Installation
npm i sain-apigw-selcom
const Selcom = require('sain-apigw-selcom');
try{
let selcom = new Selcom({
baseUrl: process.env.API_ENDPOINT,
apiKey: process.env.API_KEY,
secretKey:process.env.SECRET_KEY
})
let response = await selcom.request(url, 'GET', jsonData);
console.log(response);
# return response;
}catch(err){
throw err;
}