Exemplo n.º 1
0
        /// <summary>
        /// Retrieve all champions
        /// </summary>
        public IList<Champion> Get(SummonerRegion region)
        {
            var request = new RestRequest("/api/lol/{region}/v1.1/champion", Method.GET);

            request.AddUrlSegment("region", region.ToString().ToLower());

            return Execute<AllChampions>(request).Champions;
        }
Exemplo n.º 2
0
        /// <summary>
        /// Retrieves leagues data for summoner, including leagues for all of summoner's teams 
        /// </summary>
        public IDictionary<string, League> Get(SummonerRegion region, long id)
        {
            var request = new RestRequest("/api/lol/{region}/v2.2/league/by-summoner/{id}", Method.GET);

            request.AddUrlSegment("id", id.ToString());
            request.AddUrlSegment("region", region.ToString().ToLower());

            return Execute<Dictionary<string, League>>(request);
        }
Exemplo n.º 3
0
        /// <summary>
        /// Retrieves teams for given summoner ID 
        /// </summary>
        public IList<Team> GetBySummoner(SummonerRegion region, int id)
        {
            var request = new RestRequest("/api/lol/{region}/v2.2/team/by-summoner/{id}", Method.GET);

            request.AddUrlSegment("id", id.ToString());
            request.AddUrlSegment("region", region.ToString().ToLower());

            return Execute<List<Team>>(request);
        }
Exemplo n.º 4
0
        /// <summary>
        /// Get recent games by summoner ID
        /// </summary>
        public IList<Game> GetRecent(SummonerRegion region, long id)
        {
            var request = new RestRequest("/api/lol/{region}/v1.2/game/by-summoner/{id}/recent", Method.GET);

            request.AddUrlSegment("id", id.ToString());
            request.AddUrlSegment("region", region.ToString().ToLower());

            return Execute<RecentGames>(request).Games;
        }
Exemplo n.º 5
0
        /// <summary>
        /// Get player stats summaries by summoner ID. One summary is returned per queue type
        /// </summary>
        public IList<PlayerStatsSummary> GetSummaryBySummoner(SummonerRegion region, StatsSeason season, long id)
        {
            var request = new RestRequest("/api/lol/{region}/v1.2/stats/by-summoner/{id}/summary", Method.GET);

            request.AddUrlSegment("id", id.ToString());
            request.AddUrlSegment("region", region.ToString().ToLower());
            request.AddParameter("season", season.ToString());

            return Execute<PlayerStatsSummaryList>(request).PlayerStatSummaries;
        }
Exemplo n.º 6
0
        /// <summary>
        /// ked Get ranked stats by summoner ID. Includes statistics for Twisted Treeline and Summoner's Rift
        /// </summary>
        public IList<PlayerRankedChampionStats> GetRankedBySummoner(SummonerRegion region, StatsSeason season, long id)
        {
            var request = new RestRequest("/api/lol/{region}/v1.2/stats/by-summoner/{id}/ranked", Method.GET);

            request.AddUrlSegment("id", id.ToString());
            request.AddUrlSegment("region", region.ToString().ToLower());
            request.AddParameter("season", season.ToString());

            return Execute<PlayerRankedStats>(request).Champions;
        }
Exemplo n.º 7
0
        /// <summary>
        /// Get Summoner by Name
        /// </summary>
        public Summoner Get(SummonerRegion region, string name)
        {
            var request = new RestRequest("/api/lol/{region}/v1.2/summoner/by-name/{name}", Method.GET);

            request.AddUrlSegment("name", name);
            request.AddUrlSegment("region", region.ToString().ToLower());

            var summoner = Execute<Summoner>(request);

            summoner.Region = region;

            return summoner;
        }
Exemplo n.º 8
0
        /// <summary>
        /// Get Summoner by id
        /// </summary>
        public Summoner Get(SummonerRegion region, long id)
        {
            var request = new RestRequest("/api/lol/{region}/v1.2/summoner/{id}", Method.GET);

            request.AddUrlSegment("id", id.ToString());
            request.AddUrlSegment("region", region.ToString().ToLower());

            var summoner = Execute<Summoner>(request);

            summoner.Region = region;

            return summoner;
        }