node package manager

tago

Tago SDK for JavaScript in the browser and Node.js

Description

Tago SDK for JavaScript in the browser and Node.js.

what where
Tago website http://tago.io
SDK documentation http://sdk.js.tago.io
General documentation http://docs.tago.io
Forum / Community http://community.tago.io

Installation

NODE >= v4

$ npm install tago --save

NODE < v4

$ npm install tago@1.* --save

If you will use it on browser, you should convert it using babel. If you use webpack to build you can add rule like this: 'exclude': /node_modules\/(?!tago)/

Quick Example

const Device = require('tago/device');
const mydevice = new Device('079a01a0-2ec4-11e6-a77d-991b8f63b767');
 
const data_to_insert = {
    'variable' : 'temperature',
    'location' : {'lat': 42.2974279, 'lng': -85.628292},
    'time'     : '2014-01-20 03:43:59',
    'unit'     : 'C',
    'value'    : 63
};
 
my_device.insert(data_to_insert)
    .then(api_response => {
        console.log('Data added', api_response);
    })
    .catch(error => {
        console.error('Error:', error);
    });
 
// -> See full documentation at: http://sdk.js.tago.io/ 

License

Tago SDK for JavaScript in the browser and Node.js is released under the Apache-2.0 License.