A Node API client for Ubidots
JavaScript
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
lib Refactor drop dependence to util.format for compatibility with tessel… Aug 11, 2014
test
.gitignore Implement some methods Apr 10, 2014
LICENCE.rst
README.rst Update README.rst Aug 11, 2014
index.js Initial commit, base API client Apr 10, 2014
package.json Upgrade version to 0.0.4 Aug 11, 2014

README.rst

Ubidots Node API Client

Node.js API Client for Ubidots

https://github.com/ubidots/ubidots-node

This is a work in progress and needs further testing

Install

$ npm install ubidots

Usage

var ubidots = require('ubidots');

var client = ubidots.createClient('YOUR-API-KEY');

client.auth(function () {
  this.getDatasources(function (err, data) {
    console.log(data.results);
  });


  var ds = this.getDatasource('xxxxxxxx');

  ds.getVariables(function (err, data) {
    console.log(data.results);
  });

  ds.getDetails(function (err, details) {
    console.log(details);
  });

  var v = this.getVariable('xxxxxxx');

  v.getDetails(function (err, details) {
    console.log(details);
  });

  v.saveValue(22);

  v.getValues(function (err, data) {
    console.log(data.results);
  });
});