sensit-api
A Javascript API wrapper for the Sens'it API
Install
$ npm install --save sensit-api
Usage
var Sensit = ; // If you do not want to use the token// You will can use credentials with the function auth().getToken(credentials)var client = ; // You can also use the token :)var client = token: 'my-token';
Authentication
getToken
You can use your credentials to get your access token:
var credentials = email: 'my@email.com' password: 'my-clear-password'; client ;
setToken
And you can set the token and the client will it for your next requests:
var credentials = email: 'my@email.com' password: 'my-clear-password'; client ;
Devices
get
client ;
Device
get
var deviceId = '1234'; client ;
updateConfiguration
var deviceId = '1234';var aConfiguration = ...; client ;
Sensor
get
var deviceId = '1234';var sensorId = '5678'; client ; client ;
License
MIT © Anthonny Querouil (@anthonny_q)