Javascript SDK
The easiest way to get started with Robin's API
NPM
Making a node app? Download the latest package:
npm install robin-js-sdk
npm install robin-js-sdk
Download for the browser
You can download (or load) the Javascript browser SDK from our CDN:
https://static.robinpowered.com/js/sdk/releases/0.7.0/robin.browser.min.js
You can also find the source on GitHub directly.
Getting set up
Once you have the SDK loaded, instantiate an instance with your access token and start making requests. Robin's Javascript SDK is a promise-based library, so you can expect all the standard promise endpoints.
Example
// Instantiate a new SDK object with your token
var robin = new Robin('[[app:Token]]');
// Get a space's current presence
robin.api.spaces.presence.get(spaceId).then(function (response) {
var peoplePresent = response.getData();
});
Updated over 3 years ago