Observable to list in Kotlin
I have a service like this
@GET("/")
fun getInfo(@Query("pew") pew1: Double, @Query("pew2") pew2: Double): Observable
So now, when I have this
I have a List to fill with server data
private var mPewList: MutableList = arrayListOf()
And then I have this function
override fun getResultFromNetwork(): Observable {
val pewObservable = pewService.getInfo("pew1","pew2")
return pewObservable.concatMap {
//How do I fill my list ??
}
}
I'm pretty new to this rxJava so...