🎧 The official command-line interface for Rocksky — a modern, decentralized music tracking and discovery platform built on the AT Protocol.
1import chalk from "chalk";
2import { RockskyClient } from "client";
3
4export async function tracks(did, { skip, limit }) {
5 const client = new RockskyClient();
6 const tracks = await client.getTracks(did, { skip, limit });
7 let rank = 1;
8 for (const track of tracks) {
9 console.log(
10 `${rank} ${chalk.magenta(track.title)} ${track.artist} ${chalk.yellow(
11 track.play_count + " plays"
12 )}`
13 );
14 rank++;
15 }
16}