package com.kfzs.duanduan.bll;


import com.sheep.jiuyan.samllsheep.BuildConfig;


/**
 * <pre>
 *     sinlov
 *
 *     /\__/\
 *    /`    '\
 *  ≈≈≈ 0  0 ≈≈≈ Hello world!
 *    \  --  /
 *   /        \
 *  /          \
 * |            |
 *  \  ||  ||  /
 *   \_oo__oo_/≡≡≡≡≡≡≡≡o
 *
 * </pre>
 * Created by sinlov on 17/2/17.
 */
public final class UrlBll {

    /**
     * 支持协议类型 http
     */
    public static final String PROTOCOL_HTTP = "http://";
    /**
     * 支持协议类型 https
     */
    public static final String PROTOCOL_HTTPS = "https://";
    /**
     * 支持协议类型 socket
     */
    public static final String PROTOCOL_SOCKET = "socket://";
    /**
     * 支持协议类型 resource
     */
    public static final String PROTOCOL_RESOURCE = "res://";

    //    public static final String REGULAR_URL = "^https?:\\/\\/(([a-zA-Z0-9_-])+(\\.)?)*(:\\d+)?(\\/((\\.)?(\\?)?=?&?[a-zA-Z0-9_-|#|%](\\?)?)*)*$";
    public static final String REGULAR_URL = "^https*:\\/\\/(([a-zA-Z0-9_-])+(\\.)?)*(:\\d+)?(\\/((\\.)?(\\?)?=?&?[a-zA-Z0-9_-|#|%](\\?)?)*)*$";

    /**
     * ******************** start所有的地址根 ********************
     */

    /**
     * 服务器地址
     */
    public static final String CAPTCHA_DOMAIN = PROTOCOL_HTTP + BuildConfig.CAPTCHA_DOMAIN;
    /**
     * API服务器地址
     */
    public static final String API_DOMAIN = PROTOCOL_HTTP + BuildConfig.API_DOMAIN;

    public static final String API_VERSION = API_DOMAIN + "/v1";

    public static final String API_VERSION_V2 = API_DOMAIN + "/v2";

    public final class IntentKey {
        public static final String CERTIFICATION_GAME_CODE = "kfzs:duanduan:game:code";
        public static final String CERTIFICATION_GAME_PACKAGE_NAME = "kfzs:duanduan:game:package:name";
        public static final String CERTIFICATION_GAME_PACKAGE_ACTIVITY = "kfzs:duanduan:game:package:activity";
    }

    public final class HeadParams {
        public static final String AUTHORIZATION = "Authorization";
        public static final String SECRET_KEY = "SECRETKEY";
        public static final String DD_CHANNEL = "DDCHANNEL";
        public static final String ANDROID_THEME = "kfsz-android-theme";
    }

    public final class HeadValues {
        public static final String THEME_NO_TITLE = "no-title";
    }

    public final class UserApi {
        public static final String USER = API_VERSION + "/user";
        public static final String SELF = USER + "/self";
        public static final String CHANGE_PASS = USER + "/channgepass";
        public static final String CHANGE_NICKNAME = USER + "/changenickname";
        public static final String BIND_PHONE = USER + "/bind";
        public static final String BIND_PHONE_STEP_ONE = "1";
        public static final String BIND_PHONE_STEP_TWO = "2";
    }

    public final class AuthApi {
        public static final String SHOW_CAPTCHA = CAPTCHA_DOMAIN + "/showimage?key=";
        public static final String AUTH = API_VERSION + "/auth";
        public static final String CAPTCHA = AUTH + "/captcha";
        public static final String FIND_PWD = AUTH + "/findPwd";
        public static final String LOGIN = AUTH + "/login";
        public static final String LOGIN_SMS = AUTH + "/login_by_sms";
        public static final String SMS_LOGIN = AUTH + "/sms_for_login";

        public static final String REGISTER = AUTH + "/register";
        public static final String SIGN_OUT = AUTH + "/signout";
        public static final String VERIFY = AUTH + "/verify";
    }

    public static class V2 {
        public static final String NEW_GAME_BOOK = API_DOMAIN + "/v2/recommend/book_recommend";
        public static final String NEW_GAME_RECOMMEND = API_DOMAIN + "/v2/recommend/new_recommend";
        public static final String GUESS_YOU_LIKE = API_DOMAIN + "/v2/recommend/speculate_recommend";
        public static final String SPECIAL_RECOMMEND = API_DOMAIN + "/v2/recommend/game_recommend";
        public static final String CATE_RECOMMEND = API_DOMAIN + "/v2/recommend/cate_recommend";
        public static final String VIP_STYLE = API_DOMAIN + "/v2/vip_img";

        //借着玩(能否借)
        public static final String BORROW_PLAY_LOAN_USERRECORD = API_DOMAIN + "/v2/loan/userRecord";

    }

    //TODO 写个注释要死人啊？？
    public static class AppStoreApi {
        public static final String RECOMMEND_GAME_GROUPS = API_VERSION + "/index_game";
        public static final String GAME_LISTS = API_VERSION + "/game";
        public static final String COUPON = API_VERSION + "/voucher/";
        public static final String COUPON_RECEIVE = API_VERSION + "/coupon/receive_list";

        //代金券
        public static final String VOUCHER_RECEIVE_LSIT = API_VERSION + "/voucher/receive_list/";
        public static final String VOUCHER_EXPIRED_LSIT = API_VERSION + "/voucher/expired_list/";

        //上传游戏下载计数统计
        public static final String GAME_COUNT_UPDATE = API_VERSION + "/game/";
        public static final String GAME_PALYED = API_VERSION + "/played_game";
        public static final String GAME_TYPES = API_VERSION + "/gametype/";//所有游戏类型-列表
        public static final String GAME_TYPES_SPECIAL = API_VERSION + "/gametype/special/";//所有游戏类型-块状部分
        //搜索页的请求
        public static final String SEARCH = API_VERSION + "/search";
        public static final String SEARCH_KEYWORDS = API_VERSION + "/search/game_names";
        public static final String BANNER = API_VERSION + "/index_banner";
        //开服列表
        public static final String OPEN_SERVER = API_VERSION + "/open_server";
        //开测列表
        public static final String OPEN_TEST = API_VERSION + "/open_ts";
        //意见反馈接口
        public static final String ADVICE = API_VERSION + "/advice";
        public static final String HOTWORDS = API_VERSION + "/hotwords";
        public static final String GUESS_YOU_LIKE = API_VERSION + "/game/guess";


        public static final int PAGE_CATEGORY_RANK = 1;
        public static final int PAGE_SOLE_GAME = 2;
        public static final int PAGE_NEW_GAME = 3;

    }

    public static class GameBookAllApi {
        public static final String GAME_ALL_BOOK = API_VERSION + "/bookgame/all";
    }

    public static class GameApi {
        public static final String GAME = API_VERSION + "/game/";
        public static final String GAME_GUESS = API_VERSION + "/game/guess?";
        public static final String DOWNLOAD_REDIRECT = API_VERSION + "/download_redirect/?";
    }

    public static class Gift {
        public static final String GIFT_LIST = API_VERSION + "/gift/";
        //已经玩过游戏礼包的接口
        public static final String GIFT_PLAYED = API_VERSION + "/gift/played";
        public static final String GIFT_EXCHANGE = API_VERSION + "/gift_codes/receive";
        public static final String GIFT_BANNER = API_VERSION + "/gift_banner/all";
        public static final String GAME_GIFT_LIST = API_VERSION + "/shelves_gift/gift_list?";

        //已领取礼包
        public static final String GIFT_RECEIVE_LIST = API_VERSION_V2 + "/shelves_gift/receive_list/";
        //已过期礼包
        public static final String GIFT_EXPIRED_LIST = API_VERSION_V2 + "/shelves_gift/expired_list/";

    }

    public static class GameBookApi {
        public static final String GAME_BOOK_POST = API_VERSION + "/bookgame";
        public static final String GAME_BOOK_MY = GAME_BOOK_POST + "/my";
    }

    public final class SDKApi {
        public static final String SDK = API_VERSION + "/sdk";
        //上传用户通讯录
        public static final String SDK_CONTACT = API_VERSION + "/user/updateContact";
    }

    //开服,开测数据
    public final class Server {
        public static final String OPEN_SERVER = API_VERSION + "/open_server/";
        public static final String OPEN_SERVER_GAMEDETAIL = API_VERSION + "/open_server/server_list?";
        public static final String OPEN_TEST = API_VERSION + "/open_ts/";
    }

    public final class UploadPic {
        public static final String UPLOAD_PIC = API_VERSION + "/uploadPic";
        public static final String AVATAR = UPLOAD_PIC + "/avatar";
        public static final String UPLOAD_PIC_TEST = UPLOAD_PIC + "/uploadPic";
    }

    public static class VersionControlApi {

        public static final String APP_VERSION_INFO = API_VERSION + "/version";


    }

    public static class AdvertisementApi {

        public static final String SPLASH_ADVERTISEMENT = API_VERSION + "/splash";
        public static final String RECOMMENDED_ADVERTISEMENT = API_VERSION + "/recommended_game";
        public static final String SPLASH_ADVERTISEMENT_FILE_NAME = "/advertisementImage";
        public static final String SPLASH_ADVERTISEMENT_IMAGE_NAME = "/splash_image.png";
    }

}


