Class: Summoner
- Inherits:
-
Object
- Object
- Summoner
- Defined in:
- lib/riot-api-ruby/summoner.rb
Class Method Summary collapse
- .byIDS(region, summonerIDS) ⇒ Object
- .byNames(region, summonerNames) ⇒ Object
- .masteries(region, summonerIDS) ⇒ Object
- .names(region, summonerIDS) ⇒ Object
- .runes(region, summonerIDS) ⇒ Object
Class Method Details
.byIDS(region, summonerIDS) ⇒ Object
10 11 12 13 14 |
# File 'lib/riot-api-ruby/summoner.rb', line 10 def self.byIDS(region, summonerIDS) uri = Utils.baseURI + '/api/lol/' + region + '/v1.4/summoner/' + summonerIDS + "?api_key=" + Utils.getAPIKey jsonRequest = open(uri).read return JSON.parse(jsonRequest) end |
.byNames(region, summonerNames) ⇒ Object
3 4 5 6 7 8 |
# File 'lib/riot-api-ruby/summoner.rb', line 3 def self.byNames(region, summonerNames) uri = Utils.baseURI + '/api/lol/' + region + '/v1.4/summoner/by-name/' + summonerNames + "?api_key=" + Utils.getAPIKey puts uri jsonRequest = open(uri).read return JSON.parse(jsonRequest) end |
.masteries(region, summonerIDS) ⇒ Object
16 17 18 19 20 |
# File 'lib/riot-api-ruby/summoner.rb', line 16 def self.masteries(region, summonerIDS) uri = Utils.baseURI + '/api/lol/' + region + '/v1.4/summoner/' + summonerIDS + '/masteries' + "?api_key=" + Utils.getAPIKey jsonRequest = open(uri).read return JSON.parse(jsonRequest) end |
.names(region, summonerIDS) ⇒ Object
22 23 24 25 26 |
# File 'lib/riot-api-ruby/summoner.rb', line 22 def self.names(region, summonerIDS) uri = Utils.baseURI + '/api/lol/' + region + '/v1.3/stats/by-summoner/' + summonerIDS + '/name' + "?api_key=" + Utils.getAPIKey jsonRequest = open(uri).read return JSON.parse(jsonRequest) end |
.runes(region, summonerIDS) ⇒ Object
28 29 30 31 32 |
# File 'lib/riot-api-ruby/summoner.rb', line 28 def self.runes(region, summonerIDS) uri = Utils.baseURI + '/api/lol/' + region + '/v1.3/stats/by-summoner/' + summonerIDS + '/runes' + "?api_key=" + Utils.getAPIKey jsonRequest = open(uri).read return JSON.parse(jsonRequest) end |