Coded a client for Spotify's Web API; Good practice with REST APIs and APP & User Authorization(OAuth2.0). Built a network graph from the User's Top Artist and grouped then by genres.
How does App Auth work for Spotify's API?
- For Basic App Authentication, the application is registered with Spotify and they provide a Client ID and Secret Key.
- Those are sent via response to Spotify's Account Services where the return an Access Token if the information is valid.
- The App User can now communicate with Spotify's Web API by including the User Acesss Token in the requests.
How does User Auth work for Spotify's API?
- Request User authorization for app to access data and log in to confirm identity.
- Once this is confirmed, the App requests an Access Token and a Refresh Token.
- Once the Access Token is received, the Application can request data from the Web API.
- If the Access Token Expires, the APP posts the Refresh Token to request a new Access token.
One thing that can improved is how the artists are grouped in genres, currently it is basic function to uses the information that Spotify provides For example an artist can have the genres ['Canadian Hip-hop',Hip-hop','Rap','Canadian Rap'] while another can have only "Brooklyn Rap", "UK Rap" or 'Emo Rap'. So the question becomes how to classify and in the best way possible since some genres are quite big and encompses many sub-genres.
To view an Interative version of the image click here.(Might take a couple seconds to load). Once it's loaded, just zoom in to play around.View Code