class RiotGamesApi::LOL::Resource::Stats
Public Class Methods
new(connection, region)
click to toggle source
Calls superclass method
RiotGamesApi::LOL::Resource::Base::new
# File lib/riot_games_api/lol/resource/stats.rb, line 5 def initialize(connection, region) super @version = 'v1.3' end
Public Instance Methods
ranked(summoner_id, season = nil)
click to toggle source
Return ranked stats data by summoner id @param [String, Integer] summoner_id @param [String] season (SEASON3, SEASON2014, SEASON2015) return current if do not set @return RankedStats
# 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)
click to toggle source
Return summary stats data by summoner id @param [String, Integer] summoner_id @param [String] season (SEASON3, SEASON2014, SEASON2015) return current if do not set @return PlayerStatsSummaryList
# 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
Private Instance Methods
resource_path(path, summoner_id)
click to toggle source
# File lib/riot_games_api/lol/resource/stats.rb, line 30 def resource_path(path, summoner_id) "stats/by-summoner/#{summoner_id}/#{path}" end