Skip to content

如何支持Retrofit Api

Tamic (码小白) edited this page Jun 23, 2017 · 1 revision

Custom Api

novate默认的BaseApiService无法满足你的需求时,novate同样支持你自己的ApiService

定义APi 同Retrofit的APi

MyApi

 public interface MyApi {

  @GET("url")
  Observable<MyBean> getdata(@QueryMap Map<String, String> maps);

 }

Execute

调用Call()

 MyApi myApi = novate.create(MyApi.class);

 novate.call(myApi.getdata(parameters),
            new BaseSubscriber<MyBean>{
            '''''''
            });

}
Clone this wiki locally