The wrapper contains to major parts:
To use this application, we first need to host the controller service and then host spotify service on different ports. After hosting the services, we need to login and get the user access token. The login process is done securely by spotify's Oauth2 protocol. Once the access token is available, the user can make calls to the spotify service and manipulate playlists and tracks.
This service lets the user login and gets the spotify access token which is used to make all the spotify api calls. It also abstracts the spotify service api making it easier to call. The main services of the controller include:
-
Login It is used to communicate with the spotify backend and initiates Oauth2 protocol.

-
Get spotify access token The spotify api backend automatically calls this api after authentication is verified. It returns the access token.

This service provides RESTful api to add, remove, and update playlists and songs. The access token obtained from the controller must be used to make these calls. The services include:
- Create public playlist
Create a public playlist in the user's spotify library

- Create private playlist
Create a public playlist in the user's spotify library

- Add tracks to playlist
Send spotify track object as request body.

- Search for a song on Spotify
Search for a track on the spotify backend. It returns spotify track object as a result of the search.

- Get user playlists
Gets a list of all the user's playlists in their library. It returns a list of all user playlists as an array of spotify playlist object.

- Get playlist tracks
Gets all the tracks present in the specified playlist. It returns a list of all the tracks in the playlist as an array of spotify track object.

- Remove playlist tracks
Removes all the specified tracks in the specified playlist. It accepts an array of spotify track objects.
