Skip to content

Commit

Permalink
handle multi word player names
Browse files Browse the repository at this point in the history
  • Loading branch information
danReynolds committed Jan 13, 2017
1 parent 751d546 commit 5e9999b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/riot_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ def get_summoner_stats(args)
end

def get_summoner_id(args)
name = args[:name]
url = "#{replace_url(@api[:summoner][:id], args)}/#{args[:name]}"
name = URI.encode(args[:name])
url = "#{replace_url(@api[:summoner][:id], args)}/#{name}"
return unless response = fetch_response(url)
response.values.first[:id].to_i
end
Expand Down

0 comments on commit 5e9999b

Please sign in to comment.