kaaes / spotify-web-api-android

A wrapper for Spotify Web API. It uses Retrofit to create Java interfaces from API endpoints
http://kaaes.github.io/spotify-web-api-android
MIT License
380 stars 138 forks source link

Support for Retrofit 2 #106

Open steffandroid opened 8 years ago

steffandroid commented 8 years ago

I've been wondering how this library might go about upgrading to Retrofit 2 (which, having entered its third beta the other day, is due to be released very soon). The SpotifyService interface would have to change entirely, as would the API key interceptor and error handling. Would it perhaps be worth modularising the library? So the data models would be moved into a 'core' module and the existing networking code would go into 'retrofit-one'. Then a 'retrofit-two' module could be developed in parallel. Additionally, there could be a 'retrofit-two-rxjava' module where the SpotifyService methods would return Observable rather than Call - this would solve #48.

Or perhaps it would be better to simply deprecate Retrofit 1 support going forward. However in that case I still think it may be worth modularising in order to support RxJava.

kabouzeid commented 8 years ago

I agree with that. Retrofit 2 and okhttp3 should be used.