onlinelabs
v0.4.0
Published
Online-Labs API client
Downloads
2
Readme
node-onlinelabs
Online Labs API Node.js client. It wraps the HTTP api library described here.
Maintained by Manfred Touron
Install
# Install from npm
npm install onlinelabs
Examples
Create a server with Node.js
var Api = require('onlinelabs'),
client = new Api({token: '<YOUR_TOKEN>'});
var data = {
name: 'c1',
organization: '<ORGANIZATION_ID>',
image: '<IMAGE_ID>',
tags: ['test', 'demo']
};
client.post('/servers', data, function(err, res) {
console.log(res.server);
});
Create a server with Coffee-Script
client = new require('onlinelabs')()
var data =
name: 'c1'
organization: '<ORGANIZATION_ID>'
image: '<IMAGE_ID>'
tags: ['test', 'demo']
client.post '/servers', data, (err, res) ->
console.log res.server
See ./examples directory for more examples
Documentation
Even if this SDK is designed to be developer-friendly and aim for self-service discovery, it is still recommended to read the official API documentation.
Alternative SDKs
- Official Python SDK: online-labs/ocs-sdk
- Cloudformation plugin, with API client in Node.js: resin-io/onlinelabs-cloudformation