Hi there,
I am using account.bucket.amount followed in this documentation: Buckets | TagoIO SDK for JavaScript and TypeScript
I have this following line in my code:
const { Analysis, Device, Services, Utils, Account } = require("/sdk");
const axios = require(“axios”);
const dayjs = require(“dayjs”);
async function myAnalysis(context) {
const account = new Account({ token: "..." });
const device_id = "5fa8a25464cead00287c1626";
const device_bucket = await account.bucket.amount(device_id);
context.log("device bucket: " + device_bucket)
}
I am not sure if this is the correct way to grab the data but I am only getting {} as an output. If you can go into more detail regarding this. I would greatly appreciate it.
Thanks!
Daniel