16 lines
392 B
TypeScript
16 lines
392 B
TypeScript
export type CiderPlaying = {
|
|
status: "ok",
|
|
info: {
|
|
albumName: string,
|
|
artistName: string,
|
|
name: string
|
|
}
|
|
}
|
|
|
|
const d = await fetch("http://localhost:10767/api/v1/playback/now-playing?token=z");
|
|
// console.log(d.status, d.statusText, await d.text())
|
|
const {info}: CiderPlaying = await d.json();
|
|
|
|
console.log(`${info.artistName} - ${info.name} [${info.albumName}]`);
|
|
console.log(info);
|