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

Function fetchArtist

Extensions/bookmark.js:507–523  ·  view source on GitHub ↗
(uri)

Source from the content-addressed store, hash-verified

505 };
506
507 const fetchArtist = async (uri) => {
508 const { queryArtistOverview } = Spicetify.GraphQL.Definitions;
509 const { data } = await Spicetify.GraphQL.Request(queryArtistOverview, {
510 uri,
511 locale: Spicetify.Locale.getLocale(),
512 includePrerelease: false,
513 });
514 const res = data.artistUnion;
515 return {
516 uri,
517 title: res.profile.name,
518 description: "Artist",
519 imageUrl:
520 res.visuals.avatarImage?.sources.reduce((prev, curr) => (prev.width > curr.width ? prev : curr)).url ||
521 res.visuals.headerImage?.sources[0].url,
522 };
523 };
524
525 const fetchTrack = async (uri, uid, context) => {
526 const base62 = uri.split(":")[2];

Callers 1

bookmark.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected