Nonstop Progressive Marxism

    node-sensit

    1.0.1 • Public • Published

    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 and license

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

    Install

    npm i node-sensit

    DownloadsWeekly Downloads

    2

    Version

    1.0.1

    License

    MIT

    Last publish

    Collaborators

    • sdecamme