예제 #1
0
        public async Task <MasteryListStatic> RetrieveMasteriesData(CreepScore.Region region, StaticDataConstants.MasteryListData masteryListData, string locale = "", string version = "")
        {
            Url url = UrlConstants.StaticDataUrlBuilder(region, UrlConstants.masteryPart);

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

            string responseString;

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