Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

Index

Constructors

Methods

  • delete(deviceID: string): Promise<string>
  • edit(deviceID: string, deviceObj: Partial<Omit<DeviceCreateInfo, "type" | "chunk_period"> & { chunk_retention: number }>): Promise<string>
  • emptyDeviceData(deviceId: string): Promise<string>
  • getDeviceData(deviceId: string, queryParams?: DataQuery): Promise<Data[]>
  • Get data from all variables in the device.

    example
    const myDevice = new Device({ token: "my_device_token" });

    const lastTenValues = await myDevice.getVariablesData("myDeviceId", { qty: 10 });

    Parameters

    • deviceId: string

      Device ID.

    • Optional queryParams: DataQuery

      Query parameters to filter the results.

    Returns Promise<Data[]>

    Array with the data values stored in the device.

  • Retrieves a list with all devices from the account

    default

    queryObj: { page: 1, fields: ["id", "name"], filter: {}, amount: 20, orderBy: "name,asc", resolveBucketName: false }

    Parameters

    Returns Promise<DeviceListItem[]>

  • paramRemove(deviceID: string, paramID: string): Promise<string>
  • tokenDelete(token: string): Promise<string>