TagoIO SDK for JavaScript and TypeScript
    Preparing search index...

    Namespace Utils

    Utility functions for TagoIO SDK

    This module provides a collection of utility functions commonly needed when working with TagoIO, including environment parsing, file uploads, device management, and analysis routing.

    import { Utils } from "@tago-io/sdk";

    // Parse environment variables to JSON
    const config = Utils.envToJson(process.env.CONFIG);

    // Get device by name
    const device = await Utils.getDevice("My Device");
    // Upload file to TagoIO
    const fileInfo = await Utils.uploadFile({
    filename: "data.csv",
    buffer: csvBuffer
    });
    const router = new Utils.AnalysisRouter();
    router.register("temperature", temperatureHandler);
    router.register("humidity", humidityHandler);

    Classes

    AnalysisRouter

    Variables

    getAPIVersion

    Functions

    envToJson
    getDevice
    getTokenByName
    parseLorawanQRCode
    updateMultipleDropdown
    uploadFile