示例#1
0
        public async Task <WarcraftlogRankings.RankingObject> GetRankingsByEncounterSlug(int encounterID, string realmSlug, string page = "1", string metric = "dps", int difficulty = 4, string regionName = "us")
        {
            WarcraftlogRankings.RankingObject l = new WarcraftlogRankings.RankingObject();
            string url = $"rankings/encounter/{encounterID}?metric={metric}&server={realmSlug}&region={regionName}&difficulty={difficulty}&page={page}&";

            return(await _apiCmd.Get <WarcraftlogRankings.RankingObject>(url));
        }
示例#2
0
        public WarcraftlogRankings.RankingObject GetRankingsByEncounterGuild(int encounterID, string realmName, string guildName, string metric = "dps", int difficulty = 4, string regionName = "us")
        {
            WarcraftlogRankings.RankingObject l = new WarcraftlogRankings.RankingObject();
            guildName = guildName.Replace(" ", "%20");
            string realmSlug = string.Empty;

            switch (regionName.ToLower())
            {
            case "us":
            {
                realmSlug = WowApi.RealmInfo.realms.Where(r => r.name.Replace("'", "").ToLower().Contains(realmName.ToLower())).Select(s => s.slug).FirstOrDefault();
                break;
            }

            case "eu":
            {
                realmSlug = WowApi.RealmInfoEu.realms.Where(r => r.name.Replace("'", "").ToLower().Contains(realmName.ToLower())).Select(s => s.slug).FirstOrDefault();
                break;
            }
            }
            string url = $"/rankings/encounter/{encounterID}?guild={guildName}&server={realmSlug}&region={regionName}&metric={metric}&difficulty={difficulty}&limit=1000&";

            l = JsonConvert.DeserializeObject <WarcraftlogRankings.RankingObject>(LogsApiRequest(url));
            return(l);
        }
示例#3
0
        public WarcraftlogRankings.RankingObject GetRankingsByEncounterSlug(int encounterID, string realmSlug, string partition, string metric = "dps", int difficulty = 4, string regionName = "us")
        {
            WarcraftlogRankings.RankingObject l = new WarcraftlogRankings.RankingObject();
            string url = $"/rankings/encounter/{encounterID}?metric={metric}&server={realmSlug}&region={regionName}&difficulty={difficulty}&limit=1000&partition={partition}&";

            l = JsonConvert.DeserializeObject <WarcraftlogRankings.RankingObject>(LogsApiRequest(url));
            return(l);
        }
示例#4
0
        public WarcraftlogRankings.RankingObject GetRankingsByEncounterGuildSlug(int encounterID, string realmSlug, string guildName, string metric = "dps", int difficulty = 4, string regionName = "us")
        {
            WarcraftlogRankings.RankingObject l = new WarcraftlogRankings.RankingObject();
            guildName = guildName.Replace(" ", "%20");
            string url = $"/rankings/encounter/{encounterID}?guild={guildName}&server={realmSlug}&region={regionName}&metric={metric}&difficulty={difficulty}&limit=1000&";

            l = JsonConvert.DeserializeObject <WarcraftlogRankings.RankingObject>(LogsApiRequest(url));
            return(l);
        }