I make a call to retrieve some data and the second call - which should be done within the first - uses one of the fields of the previous call.
val restApi = retrofit.create(RestAPI::class.java)
testAPI.searchDoc("language", "title_query")
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe { p0 ->
/** É aqui onde eu quero recuperar os dados de p0 e com eles fazer
a segunda chamada. **/
}
}
How do I use one of the first call fields to do the second? I'm using Kotlin and working with RxJava.
Short question: How do I use the data retrieved on the first call to make the second one within RxAndroid?