public async Task <SummonerSpellStatic> RetrieveSummonerSpellData(CreepScore.Region region, int id, StaticDataConstants.SpellData spellData, string locale = "", string version = "") { Url url = UrlConstants.StaticDataUrlBuilder(region, UrlConstants.summonerSpellPart).AppendPathSegment(id.ToString()); url.SetQueryParams(new { locale = locale, version = version, 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.LoadSummonerSpellStatic(JObject.Parse(responseString))); }
public async Task <ChampionListStatic> RetrieveChampionsData(CreepScore.Region region, StaticDataConstants.ChampData champData, string locale = "", string version = "", bool dataById = false) { Url url = UrlConstants.StaticDataUrlBuilder(region, UrlConstants.championPart); url.SetQueryParams(new { locale = locale, version = version, dataById = dataById.ToString(), champData = StaticDataConstants.GetChampData(champData), api_key = apiKey }); Uri uri = new Uri(url.ToString()); string responseString; try { responseString = await GetWebData(uri); } catch (CreepScoreException) { throw; } return(LoadChampionListStatic(JObject.Parse(responseString))); }
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))); }