Permalink
Browse files

use api_key in both places instead of one that way and one @@api_key

  • Loading branch information...
1 parent 6d4c55d commit 23c1ae52c3ec8410ae0c589053d49fbcd29ee773 Wesley Beary committed Aug 17, 2008
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/google_ajax.rb
View
@@ -32,7 +32,7 @@ def self.get(api, method, query, args = nil)
url = "#{API_BASE}#{api}/"
url += "#{method}?"
url += "&q=#{CGI::escape(query)}"
- url += "&key=#{api_key}" if @@api_key
+ url += "&key=#{api_key}" if api_key
url += "&" + args.collect {|key, value| "#{key}=#{value}"}.join('&') if args && !args.empty?
data = open(url, "Referer" => @@referer).read
Parser.parse(api, method, data)

0 comments on commit 23c1ae5

Please sign in to comment.