Closed sebinside closed 4 years ago
Hey, actually I know the Spotify Web API a bit. It's absolutely possible to control playback and the volume, but the Web API offers much more than that.
There are three main questions for me:
In my opinion it's not a good idea to include everything in that connection. It would be way to much. There are libraries that do just that and they are actually not that small in terms of LOC.
There are multiple authentication flows, which all have different strengths. Also all of them require to register a application to Spotify, which leads to the next question.
I would ship default keys with the application but allow them to be overwritten by a config, but that's definitely something to be discussed.
@molikuner sorry that I took so long to answer you.
What should be available in this connector?
I would start with basic playback control like pause/play, next/previous, volume and getting the title of the currently playing song and add more functionality as we need them. Using a library to accomplish this is totally fine.
How should the user be able to authenticate himself?
I would say that oauth needs to be solved in general on a higher level. I will create a seperate issue for that (#168).
For now this should follow all the other connectors which all want an authorization token. The refresh token which spotify also needs should also be set by the user. For getting the token it would be nice if something equivalent to tmi for spotify would also exist. Otherwise a good guide with curl commands would also work till we implement oauth in the framework/gui.
Should the ClientID and ClientSecret be included in ChatOverflow or will the user be forced to create its own application at the Spotify Developer Dashboard?
See above. For now the user should register their own clients and only give ChatOverflow a auth and refresh token.
Just dropping this here for later use: https://github.com/thelinmichael/spotify-web-api-java
Description
We should check if the spotify API is usable for controlling playback etc.
An use case would be that the chat or moderators set the playback volume.
References
Spotify for Developers: https://developer.spotify.com/