Skip to content

Instantly share code, notes, and snippets.

@amitshekhariitbhu
Created May 17, 2018 14:14
Show Gist options
  • Save amitshekhariitbhu/0f0bd350ab439b1383c46862c33d17b3 to your computer and use it in GitHub Desktop.
Save amitshekhariitbhu/0f0bd350ab439b1383c46862c33d17b3 to your computer and use it in GitHub Desktop.
getUserObservable()
.flatMap(new Function<ApiUser, ObservableSource<UserDetail>>() {
@Override
public ObservableSource<UserDetail> apply(ApiUser apiUser) throws Exception {
return getUserDetailObservable(apiUser);
}
})
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(getObserver());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment