···90909191 }
9292 }
9393+9494+ ["listenerViewBasic"] {
9595+ type = "object"
9696+ properties {
9797+ ["id"] = new StringType {
9898+ type = "string"
9999+ description = "The unique identifier of the actor."
100100+ }
101101+102102+ ["did"] = new StringType {
103103+ type = "string"
104104+ description = "The DID of the listener."
105105+ }
106106+107107+ ["handle"] = new StringType {
108108+ type = "string"
109109+ description = "The handle of the listener."
110110+ }
111111+112112+ ["displayName"] = new StringType {
113113+ type = "string"
114114+ description = "The display name of the listener."
115115+ }
116116+117117+ ["avatar"] = new StringType {
118118+ type = "string"
119119+ format = "uri"
120120+ description = "The URL of the listener's avatar image."
121121+ }
122122+123123+ ["mostListenedSong"] = new Ref {
124124+ ref = "app.rocksky.song.defs#songViewBasic"
125125+ }
126126+127127+ }
128128+ }
93129}
+33
apps/api/pkl/defs/artist/getArtistListeners.pkl
···11+amends "../../schema/lexicon.pkl"
22+33+lexicon = 1
44+id = "app.rocksky.artist.getArtistListeners"
55+defs = new Mapping<String, Query> {
66+ ["main"] {
77+ type = "query"
88+ description = "Get artist listeners"
99+ parameters = new Params {
1010+ required = List("uri")
1111+ properties {
1212+ ["uri"] = new StringType {
1313+ description = "The URI of the artist to retrieve listeners from"
1414+ format = "at-uri"
1515+ }
1616+ }
1717+ }
1818+ output {
1919+ encoding = "application/json"
2020+ schema = new ObjectType {
2121+ type = "object"
2222+ properties = new Mapping<String, Array> {
2323+ ["listeners"] = new Array {
2424+ type = "array"
2525+ items = new Ref {
2626+ ref = "app.rocksky.artist.defs#listenerViewBasic"
2727+ }
2828+ }
2929+ }
3030+ }
3131+ }
3232+ }
3333+}
+12
apps/api/src/lexicon/index.ts
···2525import type * as AppRockskyApikeyUpdateApikey from './types/app/rocksky/apikey/updateApikey'
2626import type * as AppRockskyArtistGetArtistAlbums from './types/app/rocksky/artist/getArtistAlbums'
2727import type * as AppRockskyArtistGetArtist from './types/app/rocksky/artist/getArtist'
2828+import type * as AppRockskyArtistGetArtistListeners from './types/app/rocksky/artist/getArtistListeners'
2829import type * as AppRockskyArtistGetArtists from './types/app/rocksky/artist/getArtists'
2930import type * as AppRockskyArtistGetArtistTracks from './types/app/rocksky/artist/getArtistTracks'
3031import type * as AppRockskyChartsGetScrobblesChart from './types/app/rocksky/charts/getScrobblesChart'
···355356 >,
356357 ) {
357358 const nsid = 'app.rocksky.artist.getArtist' // @ts-ignore
359359+ return this._server.xrpc.method(nsid, cfg)
360360+ }
361361+362362+ getArtistListeners<AV extends AuthVerifier>(
363363+ cfg: ConfigOf<
364364+ AV,
365365+ AppRockskyArtistGetArtistListeners.Handler<ExtractAuth<AV>>,
366366+ AppRockskyArtistGetArtistListeners.HandlerReqCtx<ExtractAuth<AV>>
367367+ >,
368368+ ) {
369369+ const nsid = 'app.rocksky.artist.getArtistListeners' // @ts-ignore
358370 return this._server.xrpc.method(nsid, cfg)
359371 }
360372