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
Return ranked stats data by summoner id.
-
#summary(summoner_id, season = nil) ⇒ Object
Return summary stats data by summoner id.
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
Return ranked stats data by summoner id
14 15 16 17 |
# File 'lib/riot_games_api/lol/resource/stats.rb', line 14 def ranked(summoner_id, season = nil) stats = get(resource_path('ranked', summoner_id), @version, season: season) RiotGamesApi::LOL::Model::Stats::RankedStats.new stats end |
#summary(summoner_id, season = nil) ⇒ Object
Return summary stats data by summoner id
23 24 25 26 |
# File 'lib/riot_games_api/lol/resource/stats.rb', line 23 def summary(summoner_id, season = nil) stats = get(resource_path('summary', summoner_id), @version, season: season) RiotGamesApi::LOL::Model::Stats::PlayerStatsSummaryList.new stats end |