1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
export function tidbytDeviceInfo({ deviceId, apiKey }: {
deviceId: string;
apiKey: string;
}) {
return fetchJSON(
`https://api.tidbyt.com/v0/devices/${deviceId}`,
{
headers: {
Authorization: `Bearer ${apiKey}`,
},
},
);
}