async Task <League[]> GetLeaguesBySummonerAsync(RiotRegion region, Summoner summoner) { var response = await HttpClient.GetAsync(protocol + region + address + leaguesBySummoner + summoner.Id + api + Key); return(JsonConvert.DeserializeObject <League[]>(await response.Content.ReadAsStringAsync())); }
public async Task <League[]> GetLeaguesByNameAsync(RiotRegion region, string name) => await GetLeaguesBySummonerAsync(region, await GetSummonerByNameAsync(region, name));
async Task <Summoner> GetSummonerByNameAsync(RiotRegion region, string name) { var response = await HttpClient.GetAsync(protocol + region + address + summonersByName + name + api + Key); return(JsonConvert.DeserializeObject <Summoner>(await response.Content.ReadAsStringAsync())); }