579 lines
17 KiB
Java
579 lines
17 KiB
Java
package com.yunbao.common.http;
|
||
|
||
import com.yunbao.common.bean.ActiveModel;
|
||
import com.yunbao.common.bean.AnchorRecommendModel;
|
||
import com.yunbao.common.bean.BaseModel;
|
||
import com.yunbao.common.bean.CheckLiveModel;
|
||
import com.yunbao.common.bean.ContributeModel;
|
||
import com.yunbao.common.bean.CustomSidebarInfoModel;
|
||
import com.yunbao.common.bean.EnterRoomNewModel;
|
||
import com.yunbao.common.bean.FaceBookUpModel;
|
||
import com.yunbao.common.bean.HourRank;
|
||
import com.yunbao.common.bean.HttpCallbackModel;
|
||
import com.yunbao.common.bean.IMLoginModel;
|
||
import com.yunbao.common.bean.LinkMicUserBeanV2;
|
||
import com.yunbao.common.bean.ListInfoMessageModel;
|
||
import com.yunbao.common.bean.LiveAiRobotBean;
|
||
import com.yunbao.common.bean.LiveDataInfoModel;
|
||
import com.yunbao.common.bean.LiveInfoModel;
|
||
import com.yunbao.common.bean.LiveRoomActivityBanner;
|
||
import com.yunbao.common.bean.LiveStetUpStatusModel;
|
||
import com.yunbao.common.bean.LiveTaskModel;
|
||
import com.yunbao.common.bean.MsgSwitchDetailModel;
|
||
import com.yunbao.common.bean.NewPeopleInfo;
|
||
import com.yunbao.common.bean.NobleRankHideUserListModel;
|
||
import com.yunbao.common.bean.NobleTrumpetModel;
|
||
import com.yunbao.common.bean.PkRankBean;
|
||
import com.yunbao.common.bean.PrankGiftBean;
|
||
import com.yunbao.common.bean.PrankHttpTurntableBean;
|
||
import com.yunbao.common.bean.RandomPkUserBean;
|
||
import com.yunbao.common.bean.RankPkInfoBean;
|
||
import com.yunbao.common.bean.SearchModel;
|
||
import com.yunbao.common.bean.SetAttentsModel;
|
||
import com.yunbao.common.bean.SlideInBannerModel;
|
||
import com.yunbao.common.bean.StarChallengeStatusModel;
|
||
import com.yunbao.common.bean.VipModel;
|
||
|
||
import java.util.List;
|
||
import java.util.Map;
|
||
|
||
import io.reactivex.Observable;
|
||
import retrofit2.http.Field;
|
||
import retrofit2.http.FormUrlEncoded;
|
||
import retrofit2.http.GET;
|
||
import retrofit2.http.POST;
|
||
import retrofit2.http.Query;
|
||
import retrofit2.http.QueryMap;
|
||
|
||
/**
|
||
* PDLive网络接口访问
|
||
*/
|
||
public interface PDLiveApi {
|
||
/**
|
||
* 用户手机号登录
|
||
*
|
||
* @param userName
|
||
* @param passWord
|
||
* @param uuidDevice
|
||
* @param pushid
|
||
* @param lastlogindevice
|
||
* @return
|
||
*/
|
||
@FormUrlEncoded
|
||
@POST("/api/public/?service=Login.userLogin")
|
||
Observable<ResponseModel<IMLoginModel>> loginByManager(
|
||
@Field("user_login") String userName,
|
||
@Field("user_pass") String passWord,
|
||
@Field("uuid_Device") String uuidDevice,
|
||
@Field("pushid") String pushid,
|
||
@Field("lastlogindevice") String lastlogindevice
|
||
);
|
||
|
||
/**
|
||
* 获取用户贵族喇叭的数量 参数 uid token
|
||
*
|
||
* @return
|
||
*/
|
||
@GET("/api/public/?service=Noble.getNobleTrumpetNum")
|
||
Observable<ResponseModel<NobleTrumpetModel>> getNobleTrumpetNum();
|
||
|
||
/**
|
||
* 贵族使用喇叭
|
||
*
|
||
* @param trumpetMsg 喇叭内容
|
||
* @param anchorid 主播id
|
||
* @return
|
||
*/
|
||
@GET("/api/public/?service=Noble.nobleUseTrumpet")
|
||
Observable<ResponseModel<List<BaseModel>>> nobleUseTrumpet(
|
||
@Query("trumpet_msg") String trumpetMsg,
|
||
@Query("anchor_id") String anchorid);
|
||
|
||
/**
|
||
* FB是否替换新key
|
||
*/
|
||
@GET("/api/public/?service=Login.getFaceBookUpType")
|
||
Observable<ResponseModel<FaceBookUpModel>> faceBookUp();
|
||
|
||
/**
|
||
* 搜索
|
||
*
|
||
* @param jianKey 簡體關鍵字
|
||
* @param fanKey 繁體關鍵字
|
||
* @param type 搜索類型 1,全部
|
||
* @param p 頁碼
|
||
* @return
|
||
*/
|
||
@GET("/api/public/?service=Home.newSearch")
|
||
Observable<ResponseModel<List<List<SearchModel>>>> search(
|
||
@Query("jian_key") String jianKey,
|
||
@Query("fan_key") String fanKey,
|
||
@Query("type") int type,
|
||
@Query("p") int p);
|
||
|
||
/**
|
||
* 搜索(返回数据格式不一样所以写了两个方法其实就是同一个接口)
|
||
*
|
||
* @param jianKey 簡體關鍵字
|
||
* @param fanKey 繁體關鍵字
|
||
* @param type 搜索類型 2,主播 3,用戶
|
||
* @param p 頁碼
|
||
* @return
|
||
*/
|
||
@GET("/api/public/?service=Home.newSearch")
|
||
Observable<ResponseModel<List<SearchModel>>> searchNew(
|
||
@Query("jian_key") String jianKey,
|
||
@Query("fan_key") String fanKey,
|
||
@Query("type") int type,
|
||
@Query("p") int p);
|
||
|
||
/**
|
||
* 猜你喜欢
|
||
*
|
||
* @param num 请求数量
|
||
* @return
|
||
*/
|
||
@GET("/api/public/?service=Home.anchorRecommend ")
|
||
Observable<ResponseModel<AnchorRecommendModel>> anchorRecommend(
|
||
@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
|
||
);
|
||
|
||
/**
|
||
* 获取直播间信息
|
||
*
|
||
* @param liveuid 主播id
|
||
* @return
|
||
*/
|
||
@GET("/api/public/?service=Live.getLiveInfo")
|
||
Observable<ResponseModel<List<LiveInfoModel>>> getLiveInfo(
|
||
@Query("liveuid") String liveuid
|
||
);
|
||
|
||
/**
|
||
* 关注主播
|
||
*
|
||
* @param liveuid
|
||
* @return
|
||
*/
|
||
@GET("/api/public/?service=User.setAttents")
|
||
Observable<ResponseModel<List<SetAttentsModel>>> setAttents(
|
||
@Query("touid") String liveuid
|
||
);
|
||
|
||
/**
|
||
* 获取首页位
|
||
*/
|
||
@GET("/api/public/?service=Home.getHot")
|
||
Observable<ResponseModel<List<SlideInBannerModel>>> getHot(
|
||
@Query("p") int page
|
||
);
|
||
|
||
/**
|
||
* 获取活动
|
||
*/
|
||
@GET("/api/public/?service=Active.getActiveList")
|
||
Observable<ResponseModel<List<ActiveModel>>> getActiveList();
|
||
|
||
/**
|
||
* 获取多人连麦列表
|
||
*/
|
||
@GET("/api/public/?service=live.getDrLm")
|
||
Observable<ResponseModel<List<LinkMicUserBeanV2>>> getDrLm(@Query("uid") String uid);
|
||
|
||
/**
|
||
* 获取日榜、周榜数据
|
||
*
|
||
* @param uid 直播间id,并非用户uid
|
||
* @return 榜单结构
|
||
*/
|
||
@GET("/api/public/?service=Contribute.index")
|
||
Observable<ResponseModel<ContributeModel>> getRanksList(@Query("uid") String uid);
|
||
|
||
/**
|
||
* 直播间新人特惠信息
|
||
*
|
||
* @return 新人特惠数据
|
||
*/
|
||
@GET("/api/public/?service=Live.newUserPreferential")
|
||
Observable<ResponseModel<NewPeopleInfo>> getNewPeopleInfo();
|
||
|
||
/**
|
||
* 获取推送关注的开关和关注列表
|
||
*/
|
||
@GET("/api/public/?service=Tx.offlineMsgSwitchDetail")
|
||
Observable<ResponseModel<MsgSwitchDetailModel>> getMsgSwitchDetail();
|
||
|
||
/**
|
||
* 推送关注的开关设置
|
||
*/
|
||
@GET("/api/public/?service=Tx.setMsgMasterSwitch")
|
||
Observable<ResponseModel<BaseModel>> setMsgMasterSwitch(@Query("status") String status, @Query("type") String type);
|
||
|
||
/**
|
||
* 开播推送设置开关
|
||
*/
|
||
@GET("/api/public/?service=Tx.setBeginShowMsgSwitch")
|
||
Observable<ResponseModel<List<BaseModel>>> setBeginShowMsgSwitch(@Query("status") String status, @Query("isAll") String isAll, @Query("liveuid") String liveuid);
|
||
|
||
/**
|
||
* 小时榜接口
|
||
*
|
||
* @param liveuid 直播间id
|
||
*/
|
||
@GET("/api/public/?service=Live.getHourChartRank")
|
||
Observable<ResponseModel<List<HourRank>>> getHourChartRank(@Query("liveuid") String liveuid);
|
||
|
||
/**
|
||
* 清除系统消息的未读数
|
||
*/
|
||
@GET("/api/public/?service=Message.setMessageReadAll")
|
||
Observable<ResponseModel<List<String>>> setMessageReadAll();
|
||
|
||
/**
|
||
* 获取当前用户指导员ID
|
||
*/
|
||
@GET("/api/public/?service=User.getUserInstructor")
|
||
Observable<ResponseModel<List<VipModel>>> getUserInstructor();
|
||
|
||
/**
|
||
* 获取隐藏榜单的用户id
|
||
*/
|
||
@GET("/api/public/?service=Noble.getNobleRankHideUserList")
|
||
Observable<ResponseModel<NobleRankHideUserListModel>> getNobleRankHideUserList();
|
||
|
||
/**
|
||
* 获取当前星级
|
||
*
|
||
* @param liveUid
|
||
* @return
|
||
*/
|
||
@GET("/api/public/?service=StarChallenge.getStarChallengeStatus")
|
||
Observable<ResponseModel<StarChallengeStatusModel>> getStarChallengeStatus(@Query("liveUid") String liveUid);
|
||
|
||
/**
|
||
* 【新人特惠】【趣味游戏】【幸运天使】
|
||
*/
|
||
@GET("/api/public/?service=Live.getLiveRoomActivtyBanner")
|
||
Observable<ResponseModel<List<LiveRoomActivityBanner>>> getLiveRoomActivityBanner();
|
||
|
||
/**
|
||
* 新侧边栏请求
|
||
*/
|
||
@GET("/api/public/?service=Live.getCustomSidebarInfo")
|
||
Observable<ResponseModel<List<CustomSidebarInfoModel>>> getCustomSidebarInfo();
|
||
|
||
/**
|
||
* 任务领取接口
|
||
*/
|
||
@GET("/api/public/?service=Task.sendTaskGift")
|
||
Observable<ResponseModel<List<Observable>>> sendTaskGift(@Query("flag") String flag, @Query("type") String type);
|
||
|
||
/**
|
||
* PK排位赛接口
|
||
*/
|
||
@GET("/api/public/?service=Ranking.getAnchorRankData")
|
||
Observable<ResponseModel<PkRankBean>> getPkRanksList(@Query("anchor_id") String anchorId, @Query("anchor_id2") String pkUid);
|
||
|
||
/**
|
||
* 多人连麦-创建房间
|
||
*/
|
||
@GET("/api/public/?service=Live.createDrLm")
|
||
Observable<ResponseModel<BaseModel>> createDrLm();
|
||
|
||
/**
|
||
* 多人连麦-关闭房间
|
||
*/
|
||
@GET("/api/public/?service=Live.delDrLm")
|
||
Observable<ResponseModel<BaseModel>> delDrLm();
|
||
|
||
/**
|
||
* 多人连麦-踢出用户
|
||
*
|
||
* @param uid 对方uid
|
||
* @param roomId 当前房间号
|
||
*/
|
||
@GET("/api/public/?service=Live.killDrLm")
|
||
Observable<ResponseModel<BaseModel>> killDrLm(@Query("uid") String uid, @Query("roomid") String roomId);
|
||
|
||
/**
|
||
* 新进入房间接口
|
||
*
|
||
* @param groupId 房间名 g+liveUid
|
||
* @param stream
|
||
* @param liveUid
|
||
* @param city
|
||
* @return
|
||
*/
|
||
@GET("/api/public/?service=Live.enterRoomNew")
|
||
Observable<ResponseModel<EnterRoomNewModel>> enterRoomNew(
|
||
@Query("GroupId") String groupId,
|
||
@Query("stream") String stream,
|
||
@Query("liveuid") String liveUid,
|
||
@Query("city") String city
|
||
);
|
||
|
||
/**
|
||
* 检查直播间状态
|
||
*
|
||
* @return
|
||
*/
|
||
@GET("/api/public/?service=Live.checkLive")
|
||
Observable<ResponseModel<List<CheckLiveModel>>> checkLive(
|
||
@Query("liveuid") String liveUid,
|
||
@Query("stream") String stream
|
||
);
|
||
|
||
/**
|
||
* 加入房间推送Im欢迎语
|
||
*/
|
||
@GET("/api/public/?service=Tx.userJoinRoomNew")
|
||
Observable<ResponseModel<String>> userJoinRoomNew(
|
||
@Query("GroupId") String GroupId,
|
||
@Query("stream") String stream
|
||
);
|
||
|
||
/**
|
||
* 加入房间推送Im欢迎语
|
||
*/
|
||
@GET("/api/public/?service=Tx.leaveRoomNew")
|
||
Observable<ResponseModel<List<Object>>> leaveRoomNew(
|
||
@Query("GroupId") String GroupId,
|
||
@Query("stream") String stream
|
||
);
|
||
|
||
/**
|
||
* 获取随机PK开关
|
||
*
|
||
* @return 1=开,0=关
|
||
*/
|
||
@GET("/api/public/?service=Livepk.getRandomPKType")
|
||
Observable<ResponseModel<List<Integer>>> getRandomPkSwitch();
|
||
|
||
/**
|
||
* 设置随机PK开关
|
||
*
|
||
* @param pk 1=开,0=关
|
||
*/
|
||
@GET("/api/public/?service=Livepk.setRandomPKType")
|
||
Observable<ResponseModel<List<BaseModel>>> changeRandomPkSwitch(@Query("random_pk") int pk);
|
||
|
||
/**
|
||
* 获取自由PK次数
|
||
*/
|
||
@GET("/api/public/?service=Livepk.getActivePkNum")
|
||
Observable<ResponseModel<Integer>> getFreePkNumber();
|
||
|
||
/**
|
||
* 发起随机PK
|
||
*/
|
||
@GET("/api/public/?service=Livepk.setRandomPK")
|
||
Observable<ResponseModel<String>> randomPK();
|
||
|
||
/**
|
||
* 随机PK后调用接口给后台记录
|
||
*/
|
||
@GET("/api/public/?service=Livepk.startRandomPK")
|
||
Observable<ResponseModel<BaseModel>> startRandomPK(@Query("pkuid") String pkuid);
|
||
|
||
/**
|
||
* 自由PK开始后调用接口扣掉次数
|
||
*/
|
||
@GET("/api/public/?service=Livepk.setActivePkNum")
|
||
Observable<ResponseModel<BaseModel>> setFreePkNum();
|
||
|
||
/**
|
||
* 随机PK搜索用户
|
||
*
|
||
* @param cs 简体关键字/uid
|
||
* @param ct 繁体关键字/uid
|
||
*/
|
||
@GET("/api/public/?service=Livepk.searchUser")
|
||
Observable<ResponseModel<List<RandomPkUserBean>>> randomPkSearchUser(@Query("jian_key") String cs, @Query("fan_key") String ct);
|
||
|
||
/**
|
||
* 拒绝随机PK
|
||
*/
|
||
@GET("/api/public/?service=Livepk.setBanRandomPK")
|
||
Observable<ResponseModel<BaseModel>> setBanRandomPK();
|
||
|
||
/**
|
||
* 拒绝随机PK
|
||
*/
|
||
@GET("/api/public/?service=Ranking.getRankingInfo")
|
||
Observable<ResponseModel<RankPkInfoBean>> getRankingInfo();
|
||
|
||
/**
|
||
* 获取转盘整蛊列表
|
||
*/
|
||
@GET("/api/public/?service=Prank.getAnchorPrankTurntable")
|
||
Observable<ResponseModel<PrankHttpTurntableBean>> getAnchorPrankTurntable(
|
||
@Query("anchor_id") String anchor_id
|
||
);
|
||
|
||
/**
|
||
* 提交整蛊
|
||
*/
|
||
@GET("/api/public/?service=Prank.setAnchorPrankTurntable")
|
||
Observable<ResponseModel<List<BaseModel>>> setAnchorPrankTurntable(
|
||
@Query("anchor_id") String anchor_id,
|
||
@Query("coin") String coin,
|
||
@Query("turntable_one") String turntable_one,
|
||
@Query("turntable_two") String turntable_two,
|
||
@Query("turntable_three") String turntable_three,
|
||
@Query("turntable_four") String turntable_four,
|
||
@Query("turntable_five") String turntable_five,
|
||
@Query("turntable_six") String turntable_six,
|
||
@Query("status") String status
|
||
);
|
||
|
||
/**
|
||
* 转盘整蛊结束后调用的接口
|
||
*/
|
||
@GET("/api/public/?service=Prank.endPrankTurntable")
|
||
Observable<ResponseModel<List<BaseModel>>> endPrankTurntable(
|
||
@Query("anchor_id") String anchor_id
|
||
);
|
||
|
||
|
||
/**
|
||
* 获取整蛊列表
|
||
*/
|
||
@GET("/api/public/?service=Prank.prankList")
|
||
Observable<ResponseModel<List<PrankGiftBean>>> prankList(@Query("anchor_id") String anchor_id);
|
||
|
||
/**
|
||
* 设置礼物整蛊
|
||
*/
|
||
@GET("/api/public/?service=Prank.setPrank")
|
||
Observable<ResponseModel<List<BaseModel>>> setPrank(
|
||
@Query("anchor_id") String anchor_id,
|
||
@Query("gift_id") String gift_id,
|
||
@Query("gift_num") String gift_num,
|
||
@Query("prank_content") String prank_content
|
||
);
|
||
|
||
/**
|
||
* 删除礼物整蛊
|
||
*/
|
||
@GET("/api/public/?service=Prank.deletePrank")
|
||
Observable<ResponseModel<List<BaseModel>>> deletePrank(
|
||
@Query("anchor_id") String anchor_id,
|
||
@Query("prank_index") String prank_index
|
||
);
|
||
|
||
/**
|
||
* 设置机器人开关
|
||
*/
|
||
@GET("/api/public/?service=Live.setAnchorAiState")
|
||
Observable<ResponseModel<HttpCallbackModel>> setAnchorAiState(
|
||
@Query("ai_state") String ai_state
|
||
);
|
||
|
||
/**
|
||
* 获取机器人信息
|
||
*/
|
||
@GET("/api/public/?service=Live.getAnchorAiState")
|
||
Observable<ResponseModel<LiveAiRobotBean>> getAnchorAiState(
|
||
);
|
||
|
||
/**
|
||
* 修改机器人信息
|
||
*/
|
||
@GET("/api/public/?service=Live.setAnchorAiState")
|
||
Observable<ResponseModel<Integer>> setAnchorAiState(
|
||
@QueryMap Map<String, Object> map
|
||
);
|
||
|
||
/**
|
||
* 获取机器人自定义话术
|
||
*
|
||
* @param type 1(自定义打招呼) 3(自定义求关注)
|
||
*/
|
||
@GET("/api/public/?service=Live.getAiAutomaticSpeech")
|
||
Observable<ResponseModel<List<LiveAiRobotBean.Message>>> getAiAutomaticSpeech(
|
||
@Query("type") String type
|
||
);
|
||
|
||
/**
|
||
* 机器人添加话术
|
||
*/
|
||
@GET("/api/public/?service=Live.addAiAutomaticSpeech")
|
||
Observable<ResponseModel<List<String>>> addAiAutomaticSpeech(
|
||
@Query("type") String type,
|
||
@Query("content") String content
|
||
);
|
||
|
||
/**
|
||
* 机器人删除话术
|
||
*/
|
||
@GET("/api/public/?service=Live.delAiAutomaticSpeech ")
|
||
Observable<ResponseModel<List<String>>> delAiAutomaticSpeech(
|
||
@Query("type") String type,
|
||
@Query("id") String id
|
||
);
|
||
|
||
/**
|
||
* 机器人修改话术
|
||
*/
|
||
@GET("/api/public/?service=Live.updateAiAutomaticSpeech")
|
||
Observable<ResponseModel<List<String>>> updateAiAutomaticSpeech(
|
||
@Query("type") String type,
|
||
@Query("id") String id,
|
||
@Query("content") String content
|
||
);
|
||
|
||
/**
|
||
* 开播获取机器人状态和心愿单状态
|
||
*/
|
||
@GET("/api/public/?service=Live.getLiveStetUpStatus")
|
||
Observable<ResponseModel<LiveStetUpStatusModel>> getLiveStetUpStatus(
|
||
@Query("liveuid") String liveUid
|
||
);
|
||
|
||
@GET("/api/public/?service=live.jieshuDRPK")
|
||
Observable<ResponseModel<BaseModel>> jieshuDRPK(
|
||
@Query("roomid") String roomId,
|
||
@Query("uid") String uid);
|
||
|
||
@GET("/api/public/?service=Message.getListInfo")
|
||
Observable<ResponseModel<List<ListInfoMessageModel>>> getListInfo(
|
||
@Query("type") String type,
|
||
@Query("p") int p);
|
||
|
||
/**
|
||
* 获取主播任务列表
|
||
*/
|
||
@GET("/api/public/?service=Live.getLiveTaskStatus")
|
||
Observable<ResponseModel<LiveTaskModel>> getLiveTaskList(
|
||
@Query("type") int type,
|
||
@Query("liveuid") String liveUid
|
||
);
|
||
|
||
/**
|
||
* 获取直播数据
|
||
*/
|
||
@GET("/api/public/?service=Live.getLiveStatisticalData")
|
||
Observable<ResponseModel<LiveDataInfoModel>> getLiveDataInfo(
|
||
@Query("liveuid") String liveUid
|
||
);
|
||
|
||
/**
|
||
* 获取直播数据
|
||
*/
|
||
@GET("/api/public/?service=Message.getAnchorMsg")
|
||
Observable<ResponseModel<List<ListInfoMessageModel>>> getAnchorMsg(
|
||
@Query("liveuid") String liveUid, @Query("page") int page, @Query("limit") int limit
|
||
);
|
||
}
|