Search in sources :

Example 1 with GankApi

use of com.rengwuxian.rxjavasamples.network.api.GankApi in project RxJavaSamples by rengwuxian.

the class Network method getGankApi.

public static GankApi getGankApi() {
    if (gankApi == null) {
        Retrofit retrofit = new Retrofit.Builder().client(okHttpClient).baseUrl("http://gank.io/api/").addConverterFactory(gsonConverterFactory).addCallAdapterFactory(rxJavaCallAdapterFactory).build();
        gankApi = retrofit.create(GankApi.class);
    }
    return gankApi;
}
Also used : Retrofit(retrofit2.Retrofit) GankApi(com.rengwuxian.rxjavasamples.network.api.GankApi)

Aggregations

GankApi (com.rengwuxian.rxjavasamples.network.api.GankApi)1 Retrofit (retrofit2.Retrofit)1