package com.microservices.dss.utils;

import com.alibaba.fastjson2.JSONObject;
import com.microservices.common.core.utils.DateUtils;
import com.microservices.common.core.utils.StringUtils;
import com.microservices.common.httpClient.domain.GitLinkRequestUrl;

import java.net.URISyntaxException;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;


/**
 * @author otto
 */
public class DssGitLinkRequestUrl extends GitLinkRequestUrl {
    /**
     * 获取项目最新动态
     */
    public static GitLinkRequestUrl GET_LATEST_ACTIVITIES(int page, int limit) {
       return getAdminGitLinkRequestUrl(
                String.format("/api/activity/last.json?page=%d&limit=%d", page, limit)
        );
    }

    /**
     * 获取项目排行列表
     */
    public static GitLinkRequestUrl GET_PROJECT_RANK(int time, int limit) {
        return getAdminGitLinkRequestUrl(
                String.format("/api/project_rank.json?time=%d&limit=%d", time, limit)
        );
    }

    /**
     * 获取用户排行列表
     */
    public static GitLinkRequestUrl GET_USER_RANK(int time, int limit) {
        return getAdminGitLinkRequestUrl(
                String.format("/api/user_rank.json?time=%d&limit=%d", time, limit)
        );
    }
}
