MCPcopy
hub / github.com/spicetify/cli / fetchArtistTopTenTracks

Function fetchArtistTopTenTracks

Extensions/shuffle+.js:438–447  ·  view source on GitHub ↗
(uri)

Source from the content-addressed store, hash-verified

436 }
437
438 async function fetchArtistTopTenTracks(uri) {
439 const { queryArtistOverview } = Spicetify.GraphQL.Definitions;
440 const { data, errors } = await Spicetify.GraphQL.Request(queryArtistOverview, {
441 uri,
442 locale: Spicetify.Locale.getLocale(),
443 includePrerelease: false,
444 });
445 if (errors) throw errors[0].message;
446 return data.artistUnion.discography.topTracks.items.map(({ track }) => track.uri);
447 }
448
449 async function fetchLikedTracks() {
450 const res = await Spicetify.CosmosAsync.get("sp://core-collection/unstable/@/list/tracks/all?responseFormat=protobufJson");

Callers 1

fetchAndPlayFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected