优化:

进入直播间的时间,筛选
This commit is contained in:
18401019693
2022-08-24 16:59:57 +08:00
parent 15bb24fa83
commit cff66d234d
5 changed files with 60 additions and 40 deletions

View File

@@ -115,6 +115,17 @@ public interface PDLiveApi {
@Query("num") String num
);
/**
* 直播间上下滚动列表
*
* @param num 请求数量
* @return
*/
@GET("/api/public/?service=Home.anchorRecommend ")
Observable<ResponseModel<AnchorRecommendModel>> anchorRecommend(
@Query("num") String num, @Query("type") String type
);
/**
* 获取直播间信息
*
@@ -150,6 +161,7 @@ public interface PDLiveApi {
*/
@GET("/api/public/?service=Active.getActiveList")
Observable<ResponseModel<List<ActiveModel>>> getActiveList();
/**
* 获取活动
*/
@@ -158,14 +170,16 @@ public interface PDLiveApi {
/**
* 获取日榜、周榜数据
*
* @param uid 直播间id并非用户uid
* @return 榜单结构
*/
@GET("/api/public/?service=Contribute.index")
Observable<ResponseModel<ContributeModel>> getRanksList(@Query("uid")String uid);
Observable<ResponseModel<ContributeModel>> getRanksList(@Query("uid") String uid);
/**
* 直播间新人特惠信息
*
* @return 新人特惠数据
*/
@GET("/api/public/?service=Live.newUserPreferential")

View File

@@ -112,6 +112,28 @@ public class MainNetManager {
}).isDisposed();
}
/**
* 猜你喜欢
*
* @param num 请求数量
* @return
*/
public void anchorRecommendType(String num, HttpCallback<AnchorRecommendModel> httpCallback) {
API.get().pdLiveApi(mContext).anchorRecommend(num, "1")
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(anchorRecommendModelResponseModel -> {
if (httpCallback != null) {
AnchorRecommendModel model = anchorRecommendModelResponseModel.getData().getInfo();
httpCallback.onSuccess(model);
}
}, throwable -> {
if (httpCallback != null) {
httpCallback.onError(throwable.getMessage());
}
}).isDisposed();
}
/**
* 搜索
*