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.
6 7 8 |
# File 'lib/noun_project_api/connection.rb', line 6 def access_token @access_token end |
#secret ⇒ Object
Returns the value of attribute secret.
6 7 8 |
# File 'lib/noun_project_api/connection.rb', line 6 def secret @secret end |
#token ⇒ Object
Returns the value of attribute token.
6 7 8 |
# File 'lib/noun_project_api/connection.rb', line 6 def token @token end |
Instance Method Details
#initialize(token, secret) ⇒ Object
8 9 10 11 12 13 14 |
# File 'lib/noun_project_api/connection.rb', line 8 def initialize(token, secret) @token = token @secret = secret raise ArgumentError, "Missing token or secret" unless @token && @secret @access_token = OAuth::AccessToken.new(OAuth::Consumer.new(token, secret)) end |