I'm a little bit New in Rxjava but I use it here with Retrofit + kotlin
I have a request API that giving me a data for a specific page with a query ?page=1 and after I received the first page I will know how many pages we have, so my question is :
how I can make loop request with changing query page number ?page={page number} and get all of them and combine them in a list.
if it is a big question just give me what i have to do.
thanks a lot have a nice weekend for all
Copy code
disposables.add(
ServiceRepo.getProductReviews(context, pruductId)
.subscribeOn(<http://Schedulers.io|Schedulers.io>())
.observeOn(AndroidSchedulers.mainThread())
.subscribe({
//how i can get them all here ♥
}, { throwable ->
Log.e("tag", throwable.message)
})
)