Added code to include userIp and key parameters.

This commit is contained in:
Bob Aman committed 2011-09-22 13:49:46 +03:00
1 parent a9ae33bb47
commit ef065ce8d6
2 files changed
+48 -1

No files matched your search

+5 -1
View File
@@ -32,7 +32,7 @@ module Google
# These parameters are handled differently because they're not
# parameters to the API method, but rather to the API system.
self.parameters['key'] ||= options[:key] if options[:key]
self.parameters['user_ip'] ||= options[:user_ip] if options[:user_ip]
self.parameters['userIp'] ||= options[:user_ip] if options[:user_ip]
self.headers = options[:headers] || []
if options[:body]
self.body = options[:body]
@@ -55,6 +55,10 @@ module Google
unless self.api_method
self.http_method = options[:http_method] || 'GET'
self.uri = options[:uri]
unless self.parameters.empty?
self.uri.query_values =
(self.uri.query_values || {}).merge(self.parameters)
end
end
end