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

Function _getTracks

assets/js/SpotifyFinder.js:50–60  ·  view source on GitHub ↗
(token, tracksEndPoint)

Source from the content-addressed store, hash-verified

48
49 // Function to get tracks
50 const _getTracks = async (token, tracksEndPoint) => {
51 const limit = 10
52
53 const result = await fetch(`${tracksEndPoint}?limit=${limit}`, {
54 method: 'GET',
55 headers: { Authorization: 'Bearer ' + token },
56 })
57
58 const data = await result.json()
59 return data.items
60 }
61
62 // Function to get individual track
63 const _getTrack = async (token, trackEndPoint) => {

Callers 1

getTracksFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected