scalelite-js
v0.0.1
Published
JavaScript wrapper for Scalelite API
Downloads
1
Maintainers
Readme
scalelite-js
JavaScript wrapper for Scalelite API
Installation
Using npm
npm install scalelite-js
You will also need approriate version of scalelite api. You can find it on my GitHub or DockerHub.
Usage
const Scalelite = require('scalelite-js').ScaleliteApi
const scalelite = new Scalelite(
process.env.SCALELITE_URL, // should be in form http://example.com/scalelite/api
process.env.SCALELITE_SECRET
)
// Get all servers
scalelite.getServers().then((json) => {
console.log(json.servers)
})
// Add server
scalelite.addServers('https://example.com/bigbluebutton/api', 'f3765e7f5e805c8911046ea5d2ad40ba7bea35355d56dfa3').then((json) => {
console.log(json.server.serverID)
})
For more examples refer to test directory.
Run Tests
Clone repo, install all dependencies, and run npm run test
. It will launch mocha.