lib/semantics3.rb in semantics3-0.14 vs lib/semantics3.rb in semantics3-0.15

- old
+ new

@@ -14,19 +14,20 @@ module Semantics3 @auth={} class Base - def initialize(api_key,api_secret,auth = "oauth") + def initialize(api_key,api_secret,auth = "oauth",timeout = 60) @api_key = api_key @api_secret = api_secret @auth_method = auth + @timeout = timeout raise Error.new('API Credentials Missing','You did not supply an api_key. Please sign up at https://semantics3.com/ to obtain your api_key.','api_key') if api_key == '' raise Error.new('API Credentials Missing','You did not supply an api_secret. Please sign up at https://semantics3.com/ to obtain your api_secret.','api_secret') if api_secret == '' - @consumer = OAuth::Consumer.new(@api_key, @api_secret) + @consumer = OAuth::Consumer.new(@api_key, @api_secret, :timeout => @timeout) @auth = OAuth::AccessToken.new(@consumer) end private @@ -78,10 +79,10 @@ end class Products < Base - def initialize api_key, api_secret, auth = 'oauth' + def initialize api_key, api_secret, auth = 'oauth', timeout = 60 super clear() end MAX_LIMIT = 10