UNPKG

@rocksky/cli

Version:

Command-line interface for Rocksky – scrobble tracks, view stats, and manage your listening history

17 lines (15 loc) 425 B
import chalk from "chalk"; import { RockskyClient } from "client"; export async function artists(did, { skip, limit }) { const client = new RockskyClient(); const artists = await client.getArtists(did, { skip, limit }); let rank = 1; for (const artist of artists) { console.log( `${rank} ${chalk.magenta(artist.name)} ${chalk.yellow( artist.play_count + " plays" )}` ); rank++; } }