0.0.1-rc1 • Published 3 years ago

kerb-partner v0.0.1-rc1

Weekly downloads
6
License
ISC
Repository
github
Last release
3 years ago

partner-sdk-js

Kerb Partner SDK for Javascript

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 => {
});

Installation

TODO

Configuration

TODO