package com.common.commonlibtest.manager import com.common.commonlib.net.BaseObserve import com.common.commonlib.net.callback.RequestCallBack import com.common.commonlibtest.bean.CollectionResponse import io.reactivex.rxjava3.core.Observable import okhttp3.Interceptor import retrofit2.http.GET import retrofit2.http.Headers import retrofit2.http.Path class CollectionLoader(interceptors: List) : BaseObserve(CollectionApi::class.java, interceptors) { fun getCollections(pageName: Int, callBack: RequestCallBack) { observe(api?.getCollections(pageName), callBack) } interface CollectionApi { @Headers("baseurl:debug1") @GET("/lg/collect/list/{pageNum}/json") fun getCollections(@Path("pageNum") pageNum: Int): Observable } }