node-sensit
v1.0.1
Published
Simple Sens'it API library for node.js
Downloads
12
Readme
Node Sens'it
Simple Sens'it API library for node.js
Installation
You can install node-sensit using npm:
npm install node-sensit
API Documentation
Include
var Sensit = require("sensit");
Instanciate
var sensit = new Sensit("your_token_here");
Requests
For more informations about request responses, read the official documentation
Get all devices
sensit.getAllDevices();
Exemple
sensit.getAllDevices().then(function (json) {
console.log(json);
}).fail(function (json) {
console.log('Error!');
});
Get specific device
sensit.getDevice(id_device);
Exemple
sensit.getDevice(1).then(function (json) {
console.log(json);
}).fail(function (json) {
console.log('Error!');
});
Get all sensors
sensit.getAllSensors(id_device);
Exemple
sensit.getAllSensors(1).then(function (json) {
console.log(json);
}).fail(function (json) {
console.log('Error!');
});
Get specific sensor
sensit.getSensor(id_device, id_sensor);
Exemple
sensit.getSensor(1, 2).then(function (json) {
console.log(json);
}).fail(function (json) {
console.log('Error!');
});
Author
- Email: [email protected]
- Twitter: @sdecamme
- Website: http://sebastiendecamme.fr
Copyright and license
Copyright 2014-2015 Sébastien Decamme. Released under MIT.