MCPcopy Create free account
hub / github.com/Vishal-raj-1/Awesome-JavaScript-Projects / _getGenres

Function _getGenres

assets/js/SpotifyFinder.js:20–31  ·  view source on GitHub ↗
(token)

Source from the content-addressed store, hash-verified

18
19 //Function to get Genres
20 const _getGenres = async (token) => {
21 const result = await fetch(
22 `https://api.spotify.com/v1/browse/categories?locale=sv_US`,
23 {
24 method: 'GET',
25 headers: { Authorization: 'Bearer ' + token },
26 },
27 )
28
29 const data = await result.json()
30 return data.categories.items
31 }
32
33 //Function to get playlist by selected genre
34 const _getPlaylistByGenre = async (token, genreId) => {

Callers 1

getGenresFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected