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

Configure Feed

Select the types of activity you want to include in your feed.

at feat/pgpull 36 lines 915 B view raw
1import { client } from "."; 2 3export const getFeed = () => { 4 return []; 5}; 6 7export const getFeedByUri = async (uri: string) => { 8 if (uri.includes("app.rocksky.song")) { 9 return null; 10 } 11 const response = await client.get("/xrpc/app.rocksky.scrobble.getScrobble", { 12 params: { uri }, 13 }); 14 15 if (response.status !== 200) { 16 return null; 17 } 18 19 return { 20 id: response.data?.id, 21 title: response.data?.title, 22 artist: response.data?.artist, 23 albumArtist: response.data?.albumArtist, 24 album: response.data?.album, 25 cover: response.data?.cover, 26 tags: [], 27 artistUri: response.data?.artistUri, 28 albumUri: response.data?.albumUri, 29 listeners: response.data?.listeners || 1, 30 scrobbles: response.data?.scrobbles || 1, 31 lyrics: response.data?.lyrics, 32 spotifyLink: response.data?.spotifyLink, 33 composer: response.data?.composer, 34 uri: response.data?.uri, 35 }; 36};