-
Notifications
You must be signed in to change notification settings - Fork 61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RxJava support #41
Comments
No need since Retrofit2 already supports RxJava. Indeed, it supports every interface through call adapters Add this library: compile 'com.jakewharton.retrofit:retrofit2-rxjava2-adapter:1.0.0' And extend the Tmdb class to add the support. class RxTmdb extends Tmdb {
protected Retrofit.Builder retrofitBuilder() {
return super.retrofitBuilder().
.addCallAdapterFactory(RxJava2CallAdapterFactory.create());
}
} |
@urizev But you still would have to change all the service method return types, no? Like:
has to be changed to:
@NathHorrigan In any case, you should create a fork of this library and make the necessary adjustments (find/replace return types, add call adapter). Adding any possible RxJava method seems not useful. |
Having separate RxMoviesService, etc, classes and an optional dependency on RxJava would probably not cause any issues for existing users tho |
@UweTrottmann Yes, you're right. I didn't realize. 😞 |
I'll create a fork and let you know how it goes :) |
I derived my local RxJava1 tmdb service and just using the entities. I guess we need 1 main (entities + Call) and 2 additional optional artifacts - RxJava and RxJava2. Don't know this packaging stuff well but you could check out how it is done in RxBinding for example. |
I've pushed a fork with support for Kotlin and RxJava2. But it's built as an Android Gradle library not a pure Java artifact. |
I created a fork, and relative pull request, in wich i duplcated all the services that return Observables. |
Any plans for adding support for RxJava by making service methods return observables?
The text was updated successfully, but these errors were encountered: