Closed nleroy917 closed 4 years ago
It seems that the https://api.spotify.com/v1/tracks/{track_id} endpoint doesn't return a genre for a track... The only endpoint that houses genre data would be the artists endpoint... I will need to probably "detour" and get the artist from the track, and then pull the artist data and find their genres and use that information to populate the genres object I want to return.
Use: GET https://api.spotify.com/v1/artists/{id}
Endpoint created and fully tested. Closing issue.
Create a new API endpoint to get the genre information on the playlists. It will take each track, pull the genre, and populate an object to return with each genre and the counts each time that genre occurs in the playlist.
Required Params:
Spotify Playlist ID Number
Headers:Authorization: <access_token>
Route:<playlist_id>/analysis/genres
Return Type:JSON Object
Format:{pop: 2, hip-hop: 4, pop-rock: 9, ...}
This will allow for easy integration into a Chart.JS radar chart.