requiresafe-sdk
An SDK for easily interacting with the RequireSafe API from JavaScript.
The SDK works both on the server and in a browser with browserify.
install
npm install requiresafe-sdk
example
var RequireSafe = ;var package = ; var api = authToken: "XYZ";api;
API reference
new SDK([optionsObject])
Initializing You create an instance of the SDK by using new
and optionally passing in an options object.
var SDK = ; var api = authToken: 'SOME TOKEN';
options
{Object} [optional]: An object with the following keys:authToken
{String}: an authentication token
Logging in
api;
Making calls
This module is a thin wrapper around axios and supports all the same methods and features.
The plain request method is found at api.request
and all aliases are at api.[method]
. The base part of the url is inserted for you, as well as your auth headers if they are available.
license
MIT