Class: MinxingRubySdk::Connection
- Inherits:
-
Object
- Object
- MinxingRubySdk::Connection
- Defined in:
- lib/minxing_ruby_sdk/connection.rb
Instance Attribute Summary collapse
-
#connection ⇒ Object
Returns the value of attribute connection.
-
#token ⇒ Object
Returns the value of attribute token.
-
#tokenType ⇒ Object
Returns the value of attribute tokenType.
Instance Method Summary collapse
-
#initialize(root_url) ⇒ Connection
constructor
A new instance of Connection.
Constructor Details
#initialize(root_url) ⇒ Connection
Returns a new instance of Connection.
8 9 10 11 12 13 14 |
# File 'lib/minxing_ruby_sdk/connection.rb', line 8 def initialize root_url @connection = Faraday.new(:url => root_url) do |faraday| faraday.request :url_encoded # form-encode POST params faraday.response :logger # log requests to STDOUT faraday.adapter Faraday.default_adapter # make requests with Net::HTTP end end |
Instance Attribute Details
#connection ⇒ Object
Returns the value of attribute connection.
6 7 8 |
# File 'lib/minxing_ruby_sdk/connection.rb', line 6 def connection @connection end |
#token ⇒ Object
Returns the value of attribute token.
6 7 8 |
# File 'lib/minxing_ruby_sdk/connection.rb', line 6 def token @token end |
#tokenType ⇒ Object
Returns the value of attribute tokenType.
6 7 8 |
# File 'lib/minxing_ruby_sdk/connection.rb', line 6 def tokenType @tokenType end |