Esempio n. 1
0
        public async Task <SummonerSpellListStatic> RetrieveSummonerSpellsData(CreepScore.Region region, StaticDataConstants.SpellData spellData, string locale = "", string version = "", bool dataById = false)
        {
            Url url = UrlConstants.StaticDataUrlBuilder(region, UrlConstants.summonerSpellPart);

            url.SetQueryParams(new
            {
                locale    = locale,
                version   = version,
                dataById  = dataById.ToString(),
                spellData = StaticDataConstants.GetSpellData(spellData),
                api_key   = apiKey
            });
            Uri uri = new Uri(url.ToString());

            string responseString;

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