feat(searchBar): wip

This commit is contained in:
danis
2023-11-30 21:34:05 +01:00
parent 397dfbcf5f
commit 8a00b99f9a
3 changed files with 107 additions and 58 deletions
+27
View File
@@ -384,6 +384,20 @@ export default class API {
};
}
public static getGenres(): Query<Genre[]> {
return {
key: ['genres'],
exec: () =>
API.fetch(
{
route: '/genre',
},
{ handler: PlageHandler(GenreHandler) }
).then(({ data }) => data),
}
}
/**
* Retrive a song's musicXML partition
* @param songId the id to find the song
@@ -417,6 +431,19 @@ export default class API {
};
}
public static getArtists(): Query<Artist[]> {
return {
key: ['artists'],
exec: () =>
API.fetch(
{
route: `/artist`,
},
{ handler: PlageHandler(ArtistHandler) }
).then(({ data }) => data)
}
}
/**
* Retrive a song's chapters
* @param songId the id to find the song