package org.afinal.simplecache;

import java.util.Locale;

/**
 * Created by realicing on 2018/7/23.
 * realicing@sina.com
 * 07-23 11:59:21.130 7444-7517/com.sheep.jiuyan.samllsheep I/System.out: sheepLog aCache key = app/version/new_version?type=0
 * 07-23 11:59:21.524 7444-7517/com.sheep.jiuyan.samllsheep I/System.out: sheepLog aCache key = app/advertising/advertisements?type=1
 * 07-23 11:59:23.512 7444-7517/com.sheep.jiuyan.samllsheep I/System.out: sheepLog aCache key = app/user/get_info/
 * 07-23 11:59:23.660 7444-7548/com.sheep.jiuyan.samllsheep I/System.out: sheepLog aCache key = app/user/check_label
 * 07-23 11:59:23.813 7444-7517/com.sheep.jiuyan.samllsheep I/System.out: sheepLog aCache key = app/version/new_version?type=0
 * 07-23 11:59:24.053 7444-7648/com.sheep.jiuyan.samllsheep I/System.out: sheepLog aCache key = app/user/get_info/
 * 07-23 11:59:24.056 7444-7653/com.sheep.jiuyan.samllsheep I/System.out: sheepLog aCache key = app/slideshow?platform=1
 * 07-23 11:59:24.056 7444-7651/com.sheep.jiuyan.samllsheep I/System.out: sheepLog aCache key = app/bulletin?page=1&per_page=10
 * 07-23 11:59:24.070 7444-7657/com.sheep.jiuyan.samllsheep I/System.out: sheepLog aCache key = app/url/
 * 07-23 11:59:24.077 7444-7649/com.sheep.jiuyan.samllsheep I/System.out: sheepLog aCache key = app/user/award_detail?page=0&per_page=100
 * 07-23 11:59:24.081 7444-7658/com.sheep.jiuyan.samllsheep I/System.out: sheepLog aCache key = app/find/articles_tags/list
 * 07-23 11:59:24.084 7444-7656/com.sheep.jiuyan.samllsheep I/System.out: sheepLog aCache key = app/home_list
 * 07-23 11:59:24.092 7444-7650/com.sheep.jiuyan.samllsheep I/System.out: sheepLog aCache key = app/release_task?page=1&per_page=100&platform=1&is_hot=1&is_recommend=0&about_to_begin=0&task_type=-1&is_succession=3
 * 07-23 11:59:24.095 7444-7547/com.sheep.jiuyan.samllsheep I/System.out: sheepLog aCache key = app/advertising/advertisements?type=2
 * 07-23 11:59:24.329 7444-7653/com.sheep.jiuyan.samllsheep I/System.out: sheepLog aCache key = app/find/applications/downloads/status
 * 07-23 11:59:24.371 7444-7547/com.sheep.jiuyan.samllsheep I/System.out: sheepLog aCache key = app/accepted_task/new_run_task/?is_succession=3
 * 07-23 11:59:24.634 7444-7651/com.sheep.jiuyan.samllsheep I/System.out: sheepLog aCache key = app/find/articles/list?page=1&per_page=100&tag_id=0
 */
public class ApiKey {
    //搜索热门推荐
    public static final String top_search_statistics = "app/top_search_statistics?platform=1";
    //关于我们
    public static final String new_about_us = "app/about_us/new_about_us";
    //公告
    public static final String bulletin = "app/bulletin?page=1&per_page=10";
    //轮播
    public static final String slideshow = "app/slideshow?platform=1";
    //home_list
    public static final String home_list = "app/home_list";
    //各种url配置
    public static final String url = "app/url/";
    //用户信息
    public static final String get_info = "app/user/get_info/";
    //award_detail
    public static final String award_detail = "app/user/award_detail?page=0&per_page=100";
    //游戏任务中的正在进行的任务
    public static final String run_game_task = "app/accepted_task/run_game_task";
    //游戏任务中的我的游戏
    public static final String my_games = "app/game_consumption/my_games?page=1&per_page=100";
    //首页获取所有发布的热门任务（试玩任务、游戏任务、连续任务）
    public static final String release_task = "app/release_task?page=1&per_page=100&platform=1&is_hot=1&is_recommend=0&about_to_begin=0&task_type=-1&is_succession=3";
    //新手引导
    public static final String novice_guidance = "app/user/novice_guidance";
    //用户中心模块
    public static final String user_module = "app/user_module";
    //热门用户列表
    public static final String getGameUserUserFocusHotUser = "app/game_user/user_focus/hot_user";
    //关注的用户列表
    public static final String getGameUserUserFocusList = "app/game_user/user_focus/list";
    //关注的游戏列表
    public static final String getGameUserGameFocusList = "app/game_user/game_focus/list";
    //足迹
    public static final String getUserFootPrintList = "app/user/footprint/list";
    public static final String getUserFootPrintDateCount = "app/user/footprint/date_count";
    //每日分享
    public static final String getShareList = "app/share/shares";
    public static final String sendShareResult = "app/share/share";
    //获取发布中视频列表
    public static final String getVideoList = "app/video/list";
    //查询音乐列表
    public static final String getVideoMusic = "app/video/music";
    //查询贴纸列表
    public static final String getVideoSticker = "app/video/sticker";
    //查询话题列表
    public static final String getVideoTopic = "app/video/topic";
    public static final String pageKeyUrl(String baseUrl, int page, int per_page){
        return String.format(Locale.CHINA, "%s?page=%d&per_page=%d", baseUrl, page, per_page);
    }
    public static final String pageKeyUrl2(String baseUrl, int page, int per_page){
        return String.format(Locale.CHINA, "%s?page_no=%d&page_size=%d", baseUrl, page, per_page);
    }

    public static String release_task(int page, int per_page, int about_to_begin, String task_type, int is_succession) {
        task_type = task_type.replaceAll(",", "%2C");
        return String.format(Locale.CHINA, "app/release_task?page=%d&per_page=%d&platform=1&is_hot=0&is_recommend=0&about_to_begin=%d&task_type=%s&is_succession=%d", page, per_page, about_to_begin, task_type, is_succession);
    }

    //获取正在运行的任务（试玩任务、游戏任务、连续任务）
    public static String new_run_task(int is_succession, int show_game_task) {
        return String.format(Locale.CHINA, "app/accepted_task/new_run_task/?is_succession=%d&show_game_task=%d", is_succession, show_game_task);
    }

    //发现模块标签列表
    public static final String articles_tags = "app/find/articles_tags/list";

    //发现模块发现列表
    public static String articles(int page, int per_page, int tag_id) {
        return String.format(Locale.CHINA, "app/find/articles/list?page=%d&per_page=%d&tag_id=%d", page, per_page, tag_id);
    }

    //发现模块资讯
    public static String articlesItem(int id) {
        return "app/find/articles?id=" + id;
    }

    //发现模块游戏或应用详情
    public static String applications(int id) {
        return "app/find/applications?id=" + id;
    }

    //发现模块游戏或应用详情中的分数
    public static String score_num(int id) {
        return "app/find/applications/score_num?id=" + id;
    }

    //发现模块游戏或应用详情中我的评分
    public static String my_score(int id) {
        return "app/find/applications/my_score?id=" + id;
    }

    //广告
    public static String advertisements(int type) {
        return "app/advertising/advertisements?type=" + type;
    }

    //获取任务详情
    public static String releaseTaskDesc(int releaseTaskId) {
        return String.format(Locale.CHINA, "app/release_task/%d/desc", releaseTaskId);
    }

    //获取任务详情
    public static String oldEqualsNew(String key) {
        return key + "oldEqualsNew";
    }

    //看点
    public static String awakenApp() {
        return "app/awaken/article";
    }

    //看点
    public static String awakenArticle(int page, int per_page) {
        return String.format(Locale.CHINA, "app/awaken/article?page=%d&per_page=%d", page, per_page);
    }

    //发现模块游戏或应用详情
    public static String playGameDetail(int id) {
        return "app/find/" + id;
    }

    public static final String slideshowGame = "app/game_banner?platform=1";
    public static final String friend_count_and_award = "app/user/friend_count_and_award";
    public static final String MY_ASSETS = "app/user/my_assets";
    public static final String FRIEND_COUNT_AND_AWARD = "app/user/friend_count_and_award";
    public static final String CAN_RECEIVE_AWARD = "app/user/can_receive_award";

    public static String getGameUserDetail(int focus_user_id) {
        return "app/game_user/detail?focus_user_id=" + focus_user_id;
    }
    public static String getGameUserLatelyGame(int focus_user_id) {
        return "app/game_user/lately_game?focus_user_id=" + focus_user_id;
    }
    //根据任务名（游戏名）模糊搜索
    public static String getTopSearchStatisticsHomePageSearch(String search_content){
      return String.format(Locale.CHINA, "app/top_search_statistics/home_page_search?search_content=%s", search_content);
    }
}
