Skip to content

Commit

Permalink
Merge pull request #16 from danReynolds/feature/summoners
Browse files Browse the repository at this point in the history
use first returned user for given name in region
  • Loading branch information
danReynolds committed Jan 13, 2017
2 parents b85847a + 23ebf3f commit 1126c2b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/riot_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def get_summoner_id(args)
name = args[:name]
url = "#{replace_url(@api[:summoner][:id], args)}/#{args[:name]}"
return unless response = fetch_response(url)
response[name][:id].to_i
response.values.first[:id].to_i
end

def get_item(name)
Expand Down

0 comments on commit 1126c2b

Please sign in to comment.