RxAndroid: Merge multiple calls
<p>I'm starting on Rx with RxAndroid and want to get list the images by it's API with Retrofit.</p>

<p>Retrofit interface:</p>

<pre><code>public interface ImageApi {

    @GET("image")
    Observable&lt;ImageDto&gt; getImage(@Query("id") final Integer id);
}
</code></pre>

<p>Here I get one object:</p>

<pre><code>public void getImage(final Integer id, final Observer&lt;ImageDto&gt; observer) {
    imageApi.getImage(id)
            .subscribeOn(Schedulers.newThread())
            .subscribe(observer);
}
</code></pre>

<p>And method to get list images is more complicated then I thought. In that case got List with one element:</p>

<pre><code>public void getImages(final List&lt;Integer&gt; ids, final Observer&lt;List&lt;ImageDto&gt;&gt; observer) {
    Observable.from(ids).flatMap(new Func1&lt;Integer, Observable&lt;ImageDto&gt;&gt;() {
        @Override
        public Observable&lt;ImageDto&gt; call(Integer id) {
            return imageApi.getImage(id);
        }
}).toList().subscribeOn(Schedulers.newThread()).subscribe(observer);
</code></pre>

<p>Understand that i should use:</p>

<pre><code>Observable.zip
</code></pre>

<p>but I can`t realize how. Could someone help me?</p>