Created
May 7, 2021 19:36
-
-
Save varundwarkani/ac0c5ea2957135db9a807ab45c08898c 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
newsViewModel!!.newsRepository.getNews(PAGE_KEY, PAGE_SIZE) | |
.subscribe(object : Observer<NewsAPIResponse> { | |
override fun onSubscribe(d: Disposable) { | |
Log.d(LOGGER, "onSubscribe of loadInitial") | |
} | |
override fun onNext(newsAPIResponse: NewsAPIResponse) { | |
Log.d(LOGGER, "onNext of loadInitial - " + newsAPIResponse.data?.size) | |
val news = processModelData(newsAPIResponse) | |
} | |
override fun onError(e: Throwable) { | |
Log.d(LOGGER, "onError of loadInitial - " + e.message) | |
} | |
override fun onComplete() { | |
Log.d(LOGGER, "onComplete of loadInitial") | |
} | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment