New:Socket for Asana Is Now Available.Learn more
Get Started

node-sensit

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-sensit

Simple Sens'it API library for node.js

latest
Source
npmnpm
Version
1.0.1
Version published
Weekly downloads
4
-33.33%
Maintainers
1
Weekly downloads
 
Created
Source

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

Copyright 2014-2015 Sébastien Decamme. Released under MIT.

Keywords

sensit

FAQs

Package last updated on 25 Aug 2015

Related posts