A Javascript SDK for the Rehive Platform API.
via NPM:
npm install rehive
via CDN:
https://cdn.jsdelivr.net/npm/rehive@{version_number}/build/rehive.min.js
or use the minified file in the build folder
Initialize the SDK with:
window.rehive = new Rehive(config);
or
const rehive = new Rehive(config);(NodeJS)
Your config object should contain:
-
storageMethod- Options aresessionforsessionStorageandlocalforlocalStorage, the default isundefinedwhich means the SDK will store the token in memory and not in persistent storage. -
apiVersion- Default is3(Version 3 is the only currently supported version) -
apiToken- Your Rehive API token
Example:
var config = {
apiVersion: 3,
storageMethod: "local",
apiToken: "authenticationTokenHere"
}
Initialize the sdk with:
const rehive = new Rehive(config);
Your config object should contain:
-
apiVersion- Default is3(Version 3 is the only currently supported version) -
apiToken- Your Rehive API token
Example:
var config = {
apiVersion: 3,
apiToken: "authenticationTokenHere"
}
To use this SDK with a custom API url, your config object should contain customAPIURL
Example:
var config = {
...,
customAPIURL: "https://whatever.stuff/
}
For more detailed documentation and usage Docs.
MIT license.