forked from
rocksky.app/rocksky
A decentralized music tracking and discovery platform built on AT Protocol 馃幍
1import { RockskyClient } from "client";
2
3export async function albums(did, { skip, limit = 20 }): Promise<string> {
4 const client = new RockskyClient();
5 const albums = await client.getAlbums(did, { skip, limit });
6 let rank = 1;
7 let response = `Top ${limit} albums:\n`;
8 for (const album of albums) {
9 response += `${rank} ${album.title} - ${album.artist} - ${album.play_count} plays\n`;
10 rank++;
11 }
12 return response;
13}