Пример #1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="locale"></param>
        /// <param name="region"></param>
        /// <param name="token"></param>
        /// <param name="pvpSeasonId"></param>
        /// <param name="pvpBracket"></param>
        /// <returns></returns>
        public static async Task <PvpLeaderboard> GetPvpLeaderboardApi(Base.Locale locale, Base.Region region, string token, int pvpSeasonId, PvpBracket pvpBracket)
        {
            string clientString = $"https://{region.ToDescriptionString()}.api.blizzard.com/data/wow/pvp-season/{pvpSeasonId}/pvp-leaderboard/{pvpBracket.ToDescriptionString()}?namespace=dynamic-{region.ToDescriptionString()}&locale={locale.ToDescriptionString()}&access_token={token}";

            return(await Util.RequestHandler.ParseJson <PvpLeaderboard>(clientString, token));
        }
        /// <summary>
        ///
        /// </summary>
        /// <param name="locale"></param>
        /// <param name="region"></param>
        /// <param name="token"></param>
        /// <returns></returns>
        public static async Task <MythicKeystoneDungeon> GetMythicKeystoneDungeon(Base.Locale locale, Base.Region region, string token)
        {
            string clientString = $"https://{region.ToDescriptionString()}.api.blizzard.com/data/wow/mythic-keystone/dungeon/index?namespace=dynamic-{region.ToDescriptionString()}&locale={locale.ToDescriptionString()}&access_token={token}";

            return(await Util.RequestHandler.ParseJson <MythicKeystoneDungeon>(clientString, token));
        }
        /// <summary>
        ///
        /// </summary>
        /// <param name="locale"></param>
        /// <param name="region"></param>
        /// <param name="token"></param>
        /// <param name="connectedRealmId"></param>
        /// <param name="dungeonId"></param>
        /// <param name="period"></param>
        /// <returns></returns>
        public static async Task <MythicKeystonePeriodsIndex> GetMythicKeystonePeriodsIndex(Base.Locale locale, Base.Region region, string token, int connectedRealmId, int dungeonId, int period)
        {
            string clientString = $"https://{region.ToDescriptionString()}.api.blizzard.com/data/wow/connected-realm/{connectedRealmId}/mythic-leaderboard/{dungeonId}/period/{period}?namespace=dynamic-{region.ToDescriptionString()}&locale={locale.ToDescriptionString()}&access_token={token}";

            return(await Util.RequestHandler.ParseJson <MythicKeystonePeriodsIndex>(clientString, token));
        }