A decentralized music tracking and discovery platform built on AT Protocol 🎵 rocksky.app
spotify atproto lastfm musicbrainz scrobbling listenbrainz

feat: add pagination parameters to get_artist_listeners query

+30
+8
apps/api/lexicons/artist/getArtistListeners.json
··· 15 15 "type": "string", 16 16 "description": "The URI of the artist to retrieve listeners from", 17 17 "format": "at-uri" 18 + }, 19 + "offset": { 20 + "type": "integer", 21 + "description": "Number of items to skip before returning results" 22 + }, 23 + "limit": { 24 + "type": "integer", 25 + "description": "Maximum number of results to return" 18 26 } 19 27 } 20 28 },
+6
apps/api/pkl/defs/artist/getArtistListeners.pkl
··· 13 13 description = "The URI of the artist to retrieve listeners from" 14 14 format = "at-uri" 15 15 } 16 + ["offset"] = new IntegerType { 17 + description = "Number of items to skip before returning results" 18 + } 19 + ["limit"] = new IntegerType { 20 + description = "Maximum number of results to return" 21 + } 16 22 } 17 23 } 18 24 output {
+8
apps/api/src/lexicon/lexicons.ts
··· 1208 1208 description: 'The URI of the artist to retrieve listeners from', 1209 1209 format: 'at-uri', 1210 1210 }, 1211 + offset: { 1212 + type: 'integer', 1213 + description: 'Number of items to skip before returning results', 1214 + }, 1215 + limit: { 1216 + type: 'integer', 1217 + description: 'Maximum number of results to return', 1218 + }, 1211 1219 }, 1212 1220 }, 1213 1221 output: {
+4
apps/api/src/lexicon/types/app/rocksky/artist/getArtistListeners.ts
··· 12 12 export interface QueryParams { 13 13 /** The URI of the artist to retrieve listeners from */ 14 14 uri: string 15 + /** Number of items to skip before returning results */ 16 + offset?: number 17 + /** Maximum number of results to return */ 18 + limit?: number 15 19 } 16 20 17 21 export type InputSchema = undefined
+4
apps/api/src/xrpc/app/rocksky/artist/getArtistListeners.ts
··· 39 39 try: () => 40 40 ctx.analytics.post("library.getArtistListeners", { 41 41 artist_id: params.uri, 42 + pagination: { 43 + skip: params.offset || 0, 44 + take: params.limit || 100, 45 + }, 42 46 }), 43 47 catch: (error) => 44 48 new Error(`Failed to retrieve artist's listeners: ${error}`),