JSPM

@tago-io/sdk

10.3.19-beta.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 184
  • Score
    100M100P100Q103508F
  • License Apache-2.0

TagoIO SDK for JavaScript in the browser and Node.js

Package Exports

  • @tago-io/sdk
  • @tago-io/sdk/out/modules.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@tago-io/sdk) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

TagoIO - SDK for Node.js and Browser

TagoIO provides easy connection of electronic devices with external data to driver smarter decisions using contextual analysis.

Help

TagoIO SDK for JavaScript in the browser and Node.JS.

what where
TagoIO website https://tago.io
SDK documentation https://js.sdk.tago.io
General documentation https://docs.tago.io

Installation

$ npm install @tago-io/sdk --save

Quick Example

Insert Device Data

const { Device } = require("@tago-io/sdk");

const myDevice = new Device({ token: "00000000-2ec4-11e6-a77d-991b8f63b767" });

const myData = {
  variable: "temperature",
  location: { lat: 42.2974279, lng: -85.628292 },
  time: new Date(),
  unit: "C",
  value: 63,
};

async function sendMyData() {
  const result = await myDevice.sendData(myData);

  console.log(result);
  // 1 Data Added
}

async function getMyData() {
  const result = await myDevice.getData({ variables: ["temperature"], query: "last_item" });

  console.info("Current Temperature is:", result[0] ? result[0].value : "N/A");
  // Current Temperature is: 63
}

// -> See full documentation at: https://js.sdk.tago.io/

License

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