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 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";
    }

    /**
     * 数据请求参数值
     */
    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 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";
    }

    public static class IPTV {

    }
}
