123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133 |
- package com.hc.request;
- import com.hc.model.BuildConfig;
- /**
- * 浩传请求配置
- */
- public final class Config {
- /**
- * 正确返回
- */
- public static final String RESPONSE_SUCCESS = "200";
- /**
- * 一般错误返回
- */
- public static final String RESPONSE_ERROR = "-1";
- /**
- * 未登陆
- */
- public static final String RESPONSE_NO_LOGIN = "-2";
- /**
- * 没有数据
- */
- public static final String RESPONSE_NO_DATA = "-3";
- /**
- * 浩传数据请求接口
- */
- public static class URL {
- private static final String BASE = BuildConfig.Domain + BuildConfig.port ;
- /**
- * 查询素材是否已经收藏
- */
- public static final String IS_COLLECT = BASE + "/index.php?m=Home&c=DuduApi&a=isCollect";
- /**
- * 添加观看历史,我的收藏
- */
- public static final String COLLECT = BASE + "/index.php?m=Home&c=DuduApi&a=upWatchCollectLog";
- /**
- * 删除观看历史,我的收藏
- */
- public static final String COLLECT_CANCEL = BASE + "/index.php?m=Home&c=DuduApi&a=delWatchCollectLog";
- /**
- * 新安装用户收集
- */
- public static final String COLLECT_NEW_USE = BASE + "/index.php?m=Home&c=TvApi&a=downloadMac";
- /**
- * 播放时长收集
- */
- public static final String COLLECT_PLAY_TIME = BASE + "/index.php?m=Home&c=TvApi&a=upWatchCollectLog&type=1";
- /**
- * 更新订购结果
- */
- public static final String UPDATE_ORDER = BASE + "/index.php?m=Home&c=Order&a=saveOrderResult";
- }
- /**
- * 数据请求入参
- */
- public static class PARAMS {
- /**
- * 用户ID
- */
- public static final String UID = "uid";
- /**
- * 素材ID
- */
- public static final String SOURCE_ID = "source_id";
- /**
- * 类型。<p>
- * 请求为{@link URL#COLLECT}时,对应值为{@link VALUES#COLLECT_TYPE_COLLECTION}和{@link VALUES#COLLECT_TYPE_HISTORY}
- */
- public static final String TYPE = "type";
- /**
- * mac地址
- */
- public static final String MAC = "mac_address";
- /**
- * 播放时长
- */
- public static final String PLAY_TIME = "play_time";
- }
- /**
- * 数据请求参数值
- */
- public static class VALUES {
- /**
- * 观看历史
- */
- public static final String COLLECT_TYPE_HISTORY = "1";
- /**
- * 我的收藏
- */
- public static final String COLLECT_TYPE_COLLECTION = "2";
- }
- /**
- * 请求类型
- */
- public static class WHAT {
- /**
- * 查询素材是否已经收藏
- */
- public static final int IS_COLLECT = 1;
- /**
- * 添加观看历史,我的收藏
- */
- public static final int COLLECT = 2;
- /**
- * 取消收藏
- */
- public static final int COLLECT_CANCEL = 3;
- /**
- * 更新订购
- */
- public static final int UPDATE_ORDER = 4;
- }
- public static class RESPONSE {
- public static final String CODE_COLLECT_SUCCESS = "0";
- public static final String CODE_NO_COLLECT = "1";
- public static final String CODE_HAD_COLLECT = "2";
- }
- }
|