Created
January 6, 2022 20:15
-
-
Save ericntd/162e7dfc499b965c870dadb43bb4084b to your computer and use it in GitHub Desktop.
Contribute instead of Inject example
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
@AppScope | |
class CatRepository @Contribute constructor(private val api: CatApi) { | |
fun getCat(): Single<CatResponse> { | |
return api.getCat() | |
.subscribeOn(Schedulers.io()) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment