Class: RiotGamesApi::LOL::Resource::Stats
- Defined in:
- lib/riot_games_api/lol/resource/stats.rb
Instance Method Summary collapse
-
#initialize(connection, region) ⇒ Stats
constructor
A new instance of Stats.
-
#ranked(summoner_id, season = nil) ⇒ Object
e.g.
-
#summary(summoner_id, season = nil) ⇒ Object
e.g.
Constructor Details
#initialize(connection, region) ⇒ Stats
Returns a new instance of Stats.
5 6 7 8 |
# File 'lib/riot_games_api/lol/resource/stats.rb', line 5 def initialize(connection, region) super @version = 'v1.3' end |
Instance Method Details
#ranked(summoner_id, season = nil) ⇒ Object
e.g. season = ‘SEASON3’
10 11 12 13 |
# File 'lib/riot_games_api/lol/resource/stats.rb', line 10 def ranked(summoner_id, season = nil) # e.g. season = 'SEASON3' stats = get(resource_path('ranked', summoner_id), @version, season: season) RiotGamesApi::LOL::Model::Stats::RankedStats.new stats end |
#summary(summoner_id, season = nil) ⇒ Object
e.g. season = ‘SEASON3’
15 16 17 18 |
# File 'lib/riot_games_api/lol/resource/stats.rb', line 15 def summary(summoner_id, season = nil) # e.g. season = 'SEASON3' stats = get(resource_path('summary', summoner_id), @version, season: season) RiotGamesApi::LOL::Model::Stats::PlayerStatsSummaryList.new stats end |