package com.novelbook.android.netapi; import java.util.Map; import io.reactivex.Observable; import okhttp3.ResponseBody; import retrofit2.Call; import retrofit2.http.Body; import retrofit2.http.GET; import retrofit2.http.POST; import retrofit2.http.Path; import retrofit2.http.QueryMap; import retrofit2.http.Streaming; import retrofit2.http.Url; /** * Created by 眼神 on 2018/3/27. * * 存放所有的Api */ public interface HttpApi { //请填写自己的接口名 // @POST("abc") // Observable getDataForBean(@Body DouBanMovieRequest bean); //请填写自己的接口名 @GET("top250") Observable getDataForMap(@QueryMap Map map); /** * 通过地址下载一个文件 */ @GET("ab") @Streaming Call downloadFile(@Url String fileUrl); //http://xiaoshuofenxiang.com/api/g/ @GET("g") Observable getMasterDomain(); //http://xiaoshuofenxiang.com/api/n/f2619820112625133c14dcb170f5e092.json @GET("n/{id}.json") Observable getNovel(@Path("id") String novelId); //http://xiaoshuofenxiang.com/api/n/f2619820112625133c14dcb170f5e092.mulu-urls.json @GET("n/{id}.mulu-urls.json") Observable getNovelSites(@Path("id") String novelId); //http://xiaoshuofenxiang.com/api/s/www.qu.la.json @GET("s/{siteDomain}.json") Observable getNovelRule(@Path("siteDomain") String siteDomain); }