Пример #1
0
        public async Task <RuneListStatic> RetrieveRunesData(CreepScore.Region region, StaticDataConstants.RuneListData runeListData, string locale = "", string version = "")
        {
            Url url = UrlConstants.StaticDataUrlBuilder(region, UrlConstants.runePart);

            url.SetQueryParams(new
            {
                locale       = locale,
                version      = version,
                runeListData = StaticDataConstants.GetRuneListData(runeListData),
                api_key      = apiKey
            });
            Uri uri = new Uri(url.ToString());

            string responseString;

            try
            {
                responseString = await GetWebData(uri);
            }
            catch (CreepScoreException)
            {
                throw;
            }
            return(HelperMethods.LoadRuneListStatic(JObject.Parse(responseString)));
        }