https://github.com/ubidots/ubidots-node
A Node API client for Ubidots
https://github.com/ubidots/ubidots-node
Last synced: 3 months ago
JSON representation
A Node API client for Ubidots
- Host: GitHub
- URL: https://github.com/ubidots/ubidots-node
- Owner: ubidots
- License: mit
- Archived: true
- Created: 2014-04-10T08:19:45.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2021-06-16T12:23:50.000Z (almost 4 years ago)
- Last Synced: 2025-01-12T22:11:46.797Z (4 months ago)
- Language: JavaScript
- Homepage:
- Size: 14.6 KB
- Stars: 6
- Watchers: 5
- Forks: 6
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Deprecation announcement
This library will be no longer maintained by the Ubidots team, please consider using the native node HTTP requests library to send/retrieve data following our REST API specification.
# Ubidots Node API Client
Node.js API Client for [Ubidots](http://www.ubidots.com)
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);
});
});
```##### You may find the examples with Promises and RxJs library [here](examples/)