Esempio n. 1
0
        public async Task <ItemListStatic> RetrieveItemsData(CreepScore.Region region, StaticDataConstants.ItemListData itemListData, string locale = "", string version = "")
        {
            Url url = UrlConstants.StaticDataUrlBuilder(region, UrlConstants.itemPart);

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

            string responseString;

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