Skip to content

Instantly share code, notes, and snippets.

@RoRoche
Last active November 21, 2019 16:34
Show Gist options
  • Save RoRoche/110ea662e1bb8785205b9e85aa794fc1 to your computer and use it in GitHub Desktop.
Save RoRoche/110ea662e1bb8785205b9e85aa794fc1 to your computer and use it in GitHub Desktop.
RxGetReposRequest(
restRequest = WithBodyRestRequest(
SuccessfulRestRequest(
LoggableRequest(
GetReposRequest(
client = client,
baseUrl = "https://api.github.com/",
user = "RoRoche"
)
)
)
)
).single(
).subscribeOn(
Schedulers.newThread()
).observeOn(
AndroidSchedulers.mainThread()
).subscribe(
{ repos: List<Repo> ->
// deal with repo
},
{ throwable: Throwable ->
// deal with error
}
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment