Module: NounProjectApi::Connection
Overview
Basic connection methods and setup.
Instance Attribute Summary collapse
-
#access_token ⇒ Object
Returns the value of attribute access_token.
-
#secret ⇒ Object
Returns the value of attribute secret.
-
#token ⇒ Object
Returns the value of attribute token.
Instance Method Summary collapse
Instance Attribute Details
#access_token ⇒ Object
Returns the value of attribute access_token.
4 5 6 |
# File 'lib/noun-project-api/connection.rb', line 4 def access_token @access_token end |
#secret ⇒ Object
Returns the value of attribute secret.
4 5 6 |
# File 'lib/noun-project-api/connection.rb', line 4 def secret @secret end |
#token ⇒ Object
Returns the value of attribute token.
4 5 6 |
# File 'lib/noun-project-api/connection.rb', line 4 def token @token end |
Instance Method Details
#initialize(token, secret) ⇒ Object
6 7 8 9 10 11 12 |
# File 'lib/noun-project-api/connection.rb', line 6 def initialize(token, secret) @token = token @secret = secret fail(ArgumentError, "Missing token or secret") unless @token && @secret @access_token = OAuth::AccessToken.new(OAuth::Consumer.new(token, secret)) end |