diff --git a/lib/riot_api.rb b/lib/riot_api.rb index ae91668..7b9f5a0 100644 --- a/lib/riot_api.rb +++ b/lib/riot_api.rb @@ -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