In order to test this you need to make a Spotify Developer Application. After creating an application, you can provide the spotify.clientId and the spotify.clientSecret in the application.properties file or inject it via some kind of pipeline. Authorisation via oAuth is handeled in the ApiSpotifyService.java where a request to the authorisation api is being done to receive an access token.
After merging this PR, it is possible to fetch Spotify data. This data is getting parsed into a understandable format into the Youtube API to search for video's. After a video is found, it is being played through the bot.
This also works with playlists. You can add a Spotify playlist (open.spotify.com/playlist) link to the bot. All the songs in that list will get fetched. After that, it is going to be routed to the search API of YouTube to queue the items.
Thing to watch for is that we have a limitation on the Youtube API. If the quatation is reached, the API will return 403. So maybe we need to do something about that in case someone queues a list with a lot of tracks.
Prerequirements and summary of this PR
In order to test this you need to make a Spotify Developer Application. After creating an application, you can provide the spotify.clientId and the spotify.clientSecret in the application.properties file or inject it via some kind of pipeline. Authorisation via oAuth is handeled in the ApiSpotifyService.java where a request to the authorisation api is being done to receive an access token.
After merging this PR, it is possible to fetch Spotify data. This data is getting parsed into a understandable format into the Youtube API to search for video's. After a video is found, it is being played through the bot.
This also works with playlists. You can add a Spotify playlist (open.spotify.com/playlist) link to the bot. All the songs in that list will get fetched. After that, it is going to be routed to the search API of YouTube to queue the items.
Thing to watch for is that we have a limitation on the Youtube API. If the quatation is reached, the API will return 403. So maybe we need to do something about that in case someone queues a list with a lot of tracks.
Related issues:
7
This PR contains