Created
October 2, 2014 20:48
-
-
Save rharter/9c99318faf116317d426 to your computer and use it in GitHub Desktop.
This file contains 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
public Observable<Show> getShows() { | |
return authClient.getAuthString() | |
.flatMap(token -> contentApi.getShows(token, selectedMediaServer)) | |
.flatMap(shows -> Observable.from(shows.getShows())) | |
.flatMap(this::getImdbId); | |
} | |
public Observable<Show> getImdbId(Show show) { | |
return omdbApi.searchByTitle(show.getTitle()) | |
.flatMap(movie -> { | |
show.setImdbId(movie.getImdbId()); | |
return Observable.just(show); | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment