updated summoner.names to v1.3
This commit is contained in:
@@ -75,14 +75,14 @@ class SummonerModule < SightstoneBaseModule
|
||||
def names(ids, optional={})
|
||||
region = optional[:region] || @sightstone.region
|
||||
ids = ids.join(',')
|
||||
uri = "http://prod.api.pvp.net/api/lol/#{region}/v1.2/summoner/#{ids}/name"
|
||||
uri = "http://prod.api.pvp.net/api/lol/#{region}/v1.3/summoner/#{ids}/name"
|
||||
response = _get_api_response(uri)
|
||||
_parse_response(response) { |resp|
|
||||
data = JSON.parse(resp)
|
||||
names_array = data['summoners']
|
||||
|
||||
names_hash = Hash.new
|
||||
names_array.each do |summoner|
|
||||
names_hash[summoner['id']] = summoner['name']
|
||||
data.each do |id, name|
|
||||
names_hash[id.to_i] = name
|
||||
end
|
||||
if block_given?
|
||||
yield names_hash
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
Gem::Specification.new do |s|
|
||||
s.name = 'sightstone'
|
||||
s.version = '1.4.1'
|
||||
s.date = '2014-01-17'
|
||||
s.version = '1.4.2'
|
||||
s.date = '2014-03-14'
|
||||
s.summary = 'Ruby wrapper for riots league of legends api'
|
||||
s.description = s.summary
|
||||
s.authors = ["Daniel Bauer"]
|
||||
|
||||
Reference in New Issue
Block a user