Skip to content
Javascript SDK for Rehive API
JavaScript HTML
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
build Add: Added 'sets' property for admin accounts object. Aug 9, 2019
jasmine add&fix: added transfer function test and fix other tests Jun 20, 2017
.gitignore add: added gulp task to minify file May 29, 2017
LICENSE
README.md added custom api url to config Nov 14, 2018
app.js added removeToken public method Sep 5, 2018
fetch.js add: added gulp task to minify file May 29, 2017
index.html added removeToken public method Sep 5, 2018
minify.js updated build script with node-minify and removed gulp May 23, 2018
nodetest.js
package-lock.json 1.20.32 Jan 30, 2019
package.json Add: added a script 'build' to build the minified js file Mar 13, 2019
promisePolyfill.js add: added gulp task to minify file May 29, 2017
rehive.js Add: Added 'sets' property for admin accounts object. Aug 9, 2019

README.md

Rehive Javascript SDK

About

This is the Javascript SDK for the Rehive API.

Installation

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

Getting started

Client Side

Initialize the SDK with:

window.rehive = new Rehive(config);

or

const rehive = new Rehive(config);(NodeJS)

Your config object should contain:

  • storageMethod - Options are session for sessionStorage and local for localStorage

  • apiVersion - Default is 3 (Version 3 is the only currently supported version)

  • apiToken - Your Rehive API token

Example:

	var config = {
		apiVersion: 3, 
		storageMethod: "local",
		apiToken: "authenticationTokenHere"
	}

Server Side (NodeJS)

Initialize the sdk with: const rehive = new Rehive(config);

Your config object should contain:

  • apiVersion - Default is 3 (Version 3 is the only currently supported version)

  • apiToken - Your Rehive API token

Example:

	var config = {
		apiVersion: 3, 
		apiToken: "authenticationTokenHere"
	}

Custom API url

To use this SDK with a custom API url, your config object should contain customAPIURL

Example:

	var config = {
		...,
		customAPIURL: "https://whatever.stuff/
	}

Documentation and usage

For more detailed documentation and usage Docs.

License

MIT license.

You can’t perform that action at this time.