Last active
November 3, 2017 18:28
-
-
Save douglasiacovelli/31838694ed638ca65a645fc7af22f278 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Observable.just("Will") | |
.observeOn(Schedulers.io()) | |
.flatMap({ name -> | |
updateUserName.execute(name) //returns another Observable<ApiResult> after calling the API | |
}) | |
.subscribe({ apiResult -> | |
//what if you want to use the name here again to update the local cache for example if | |
//everything goes right with the API? | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment