Class: Stats

Inherits:
Object
  • Object
show all
Defined in:
lib/riot-api-ruby/stats.rb

Class Method Summary collapse

Class Method Details

.ranked(region, summonerID, season) ⇒ Object



3
4
5
6
7
# File 'lib/riot-api-ruby/stats.rb', line 3

def self.ranked(region, summonerID, season)
  uri = Utils.baseURI + '/api/lol/' + region + '/v1.3/stats/by-summoner/' + summonerID + '/ranked?season=' + season + "&api_key=" + Utils.getAPIKey
  jsonRequest = open(uri).read
  return JSON.parse(jsonRequest)
end

.summary(region, summonerID, season) ⇒ Object



9
10
11
12
13
# File 'lib/riot-api-ruby/stats.rb', line 9

def self.summary(region, summonerID, season)
  uri = Utils.baseURI + '/api/lol/' + region + '/v1.3/stats/by-summoner/' + summonerID + '/summary?season=' + season + "&api_key=" + Utils.getAPIKey
  jsonRequest = open(uri).read
  return JSON.parse(jsonRequest)
end