예제 #1
0
        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()));
        }
예제 #2
0
 public async Task <League[]> GetLeaguesByNameAsync(RiotRegion region, string name) =>
 await GetLeaguesBySummonerAsync(region, await GetSummonerByNameAsync(region, name));
예제 #3
0
        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()));
        }