Kerb Partner SDK for Javascript
Detail documentation can be found at https://platform.kerb.works
Using npm
npm install --save kerb-partner
Using yarn
yarn add kerb-partner
import * as partner from 'kerb-partner';
// set KERB_PARTNER_HOST in your environment
// get your token from your kerb dashboard app
const token = <your-token>
partner.setApiKey(token);
const options = {
body: []
}
// partner.send use partner.request while do http request
// since we use axios for http request, so return is axion response
// see this for more information https://github.com/axios/axios#response-schema
partner.send('ping', options).then(response => {
// do something with response
});
// use custom request object
const request = partner.makeRequest('ping', options)
request.headers = {
'testign': 'ok',
'not-used': null,
}
partner.send('ping', options).then(response => {
// do something with response
}).catch(error => {
});
TODO
[] use semantic release for changelog https://github.com/semantic-release/semantic-release [] license [] code of conduct