Class: RouteNGN::Connection
- Inherits:
-
Object
- Object
- RouteNGN::Connection
- Defined in:
- lib/routengn.rb
Instance Attribute Summary collapse
-
#access_token ⇒ Object
Returns the value of attribute access_token.
Instance Method Summary collapse
-
#initialize(site, key, secret) ⇒ Connection
constructor
A new instance of Connection.
Constructor Details
#initialize(site, key, secret) ⇒ Connection
Returns a new instance of Connection.
18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/routengn.rb', line 18 def initialize(site, key, secret) @consumer = OAuth::Consumer.new key, secret, { :signature_method => 'HMAC-SHA1', :site => site } @request_token = @consumer.get_request_token @consumer.request(:get, @request_token.) @access_token = @request_token.get_access_token @access_token.consumer.http.read_timeout = 5000 end |
Instance Attribute Details
#access_token ⇒ Object
Returns the value of attribute access_token.
16 17 18 |
# File 'lib/routengn.rb', line 16 def access_token @access_token end |