Last active
October 16, 2018 21:49
-
-
Save paulocns/c0ddabb3fb7c3531f6ddb3afdd4fdb5b 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
class SearchShows @Inject | |
constructor(private val showRepository: ShowRepository) : UseCase() { | |
var id: String? = null | |
override suspend fun executeOnBackground(): Single<Show> { | |
val singleDetail = showRepository.showDetail(id).subscribeOn(Schedulers.io()) | |
val singleBanner = showRepository.showBanner(id).subscribeOn(Schedulers.io()) | |
return Single.zip(singleDetail, singleBanner, BiFunction { detail, banner -> Show(detail, banner}) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment