Class: LeagueApi::Stats
- Inherits:
-
Object
- Object
- LeagueApi::Stats
- Defined in:
- lib/league_api/stats.rb
Class Method Summary collapse
- .make_request(str, params = nil, region = nil) ⇒ Object
- .ranked(id, season = "SEASON4", region = nil) ⇒ Object
- .requests ⇒ Object
- .summary(id, season = "SEASON4", region = nil) ⇒ Object
Class Method Details
.make_request(str, params = nil, region = nil) ⇒ Object
7 8 9 |
# File 'lib/league_api/stats.rb', line 7 def self.make_request(str, params=nil, region=nil) LeagueApi.make_request(@base_url, str, params, region) end |
.ranked(id, season = "SEASON4", region = nil) ⇒ Object
11 12 13 14 |
# File 'lib/league_api/stats.rb', line 11 def self.ranked(id, season="SEASON4", region=nil) params = {"season" => season} make_request(id.to_s+'/ranked', params, region) end |
.requests ⇒ Object
21 22 23 |
# File 'lib/league_api/stats.rb', line 21 def self.requests %w( ranked(summoner_id) summary(summoner_id) ) end |
.summary(id, season = "SEASON4", region = nil) ⇒ Object
16 17 18 19 |
# File 'lib/league_api/stats.rb', line 16 def self.summary(id, season="SEASON4", region=nil) params = {"season" => season} make_request(id.to_s+'/summary', params, region) end |