A decentralized music tracking and discovery platform built on AT Protocol 馃幍 rocksky.app
spotify atproto lastfm musicbrainz scrobbling listenbrainz
at feat/pgpull 15 lines 420 B view raw
1import { RockskyClient } from "client"; 2 3export async function tracks(did, { skip, limit = 20 }) { 4 const client = new RockskyClient(); 5 const tracks = await client.getTracks(did, { skip, limit }); 6 let rank = 1; 7 let response = `Top ${limit} tracks:\n`; 8 9 for (const track of tracks) { 10 response += `${rank} ${track.title} - ${track.artist} - ${track.play_count} plays\n`; 11 rank++; 12 } 13 14 return response; 15}