sain-apigw-selcom
Version:
selcom api gateway intergration
37 lines (27 loc) • 904 B
Markdown
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
```bash
npm i sain-apigw-selcom
```
```bash
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);
}catch(err){
throw err;
}
```