Skip to content

kerb-technologies/partner-sdk-js

Repository files navigation

npm GitHub Workflow Status

partner-sdk-js

Kerb Partner SDK for Javascript

documentations

Detail documentation can be found at https://platform.kerb.works

installation

Using npm npm install --save kerb-partner

Using yarn yarn add kerb-partner

example

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

About

Kerb Partner SDK for Javascript

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors