Skip to content

Pooja-B/ubidots-node

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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);
  });
});

About

A Node API client for Ubidots

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%