Skip to content

Instantly share code, notes, and snippets.

@varundwarkani
Last active May 7, 2021 19:17
Show Gist options
  • Save varundwarkani/4deccb513a84312037a8f3548fae7137 to your computer and use it in GitHub Desktop.
Save varundwarkani/4deccb513a84312037a8f3548fae7137 to your computer and use it in GitHub Desktop.
class NewsRepository @Inject internal constructor(var apiService: ApiService) {
fun getCricketNews(offset: Int, limit: Int): Observable<CricketNewsAPIResponse> {
return apiService.getNews(limit, offset)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment