···9091 }
92 }
93+94+ ["listenerViewBasic"] {
95+ type = "object"
96+ properties {
97+ ["id"] = new StringType {
98+ type = "string"
99+ description = "The unique identifier of the actor."
100+ }
101+102+ ["did"] = new StringType {
103+ type = "string"
104+ description = "The DID of the listener."
105+ }
106+107+ ["handle"] = new StringType {
108+ type = "string"
109+ description = "The handle of the listener."
110+ }
111+112+ ["displayName"] = new StringType {
113+ type = "string"
114+ description = "The display name of the listener."
115+ }
116+117+ ["avatar"] = new StringType {
118+ type = "string"
119+ format = "uri"
120+ description = "The URL of the listener's avatar image."
121+ }
122+123+ ["mostListenedSong"] = new Ref {
124+ ref = "app.rocksky.song.defs#songViewBasic"
125+ }
126+127+ }
128+ }
129}
+33
apps/api/pkl/defs/artist/getArtistListeners.pkl
···000000000000000000000000000000000
···1+amends "../../schema/lexicon.pkl"
2+3+lexicon = 1
4+id = "app.rocksky.artist.getArtistListeners"
5+defs = new Mapping<String, Query> {
6+ ["main"] {
7+ type = "query"
8+ description = "Get artist listeners"
9+ parameters = new Params {
10+ required = List("uri")
11+ properties {
12+ ["uri"] = new StringType {
13+ description = "The URI of the artist to retrieve listeners from"
14+ format = "at-uri"
15+ }
16+ }
17+ }
18+ output {
19+ encoding = "application/json"
20+ schema = new ObjectType {
21+ type = "object"
22+ properties = new Mapping<String, Array> {
23+ ["listeners"] = new Array {
24+ type = "array"
25+ items = new Ref {
26+ ref = "app.rocksky.artist.defs#listenerViewBasic"
27+ }
28+ }
29+ }
30+ }
31+ }
32+ }
33+}
+12
apps/api/src/lexicon/index.ts
···25import type * as AppRockskyApikeyUpdateApikey from './types/app/rocksky/apikey/updateApikey'
26import type * as AppRockskyArtistGetArtistAlbums from './types/app/rocksky/artist/getArtistAlbums'
27import type * as AppRockskyArtistGetArtist from './types/app/rocksky/artist/getArtist'
028import type * as AppRockskyArtistGetArtists from './types/app/rocksky/artist/getArtists'
29import type * as AppRockskyArtistGetArtistTracks from './types/app/rocksky/artist/getArtistTracks'
30import type * as AppRockskyChartsGetScrobblesChart from './types/app/rocksky/charts/getScrobblesChart'
···355 >,
356 ) {
357 const nsid = 'app.rocksky.artist.getArtist' // @ts-ignore
00000000000358 return this._server.xrpc.method(nsid, cfg)
359 }
360
···25import type * as AppRockskyApikeyUpdateApikey from './types/app/rocksky/apikey/updateApikey'
26import type * as AppRockskyArtistGetArtistAlbums from './types/app/rocksky/artist/getArtistAlbums'
27import type * as AppRockskyArtistGetArtist from './types/app/rocksky/artist/getArtist'
28+import type * as AppRockskyArtistGetArtistListeners from './types/app/rocksky/artist/getArtistListeners'
29import type * as AppRockskyArtistGetArtists from './types/app/rocksky/artist/getArtists'
30import type * as AppRockskyArtistGetArtistTracks from './types/app/rocksky/artist/getArtistTracks'
31import type * as AppRockskyChartsGetScrobblesChart from './types/app/rocksky/charts/getScrobblesChart'
···356 >,
357 ) {
358 const nsid = 'app.rocksky.artist.getArtist' // @ts-ignore
359+ return this._server.xrpc.method(nsid, cfg)
360+ }
361+362+ getArtistListeners<AV extends AuthVerifier>(
363+ cfg: ConfigOf<
364+ AV,
365+ AppRockskyArtistGetArtistListeners.Handler<ExtractAuth<AV>>,
366+ AppRockskyArtistGetArtistListeners.HandlerReqCtx<ExtractAuth<AV>>
367+ >,
368+ ) {
369+ const nsid = 'app.rocksky.artist.getArtistListeners' // @ts-ignore
370 return this._server.xrpc.method(nsid, cfg)
371 }
372