Class: Makeleaps::Client
- Inherits:
-
Object
- Object
- Makeleaps::Client
- Extended by:
- Forwardable
- Defined in:
- lib/makeleaps/client.rb
Instance Attribute Summary collapse
-
#partner_mid ⇒ Object
Returns the value of attribute partner_mid.
-
#request ⇒ Object
readonly
Returns the value of attribute request.
Instance Method Summary collapse
- #connect! ⇒ Object
- #disconnect! ⇒ Object
-
#initialize(username, password) ⇒ Client
constructor
A new instance of Client.
Constructor Details
Instance Attribute Details
#partner_mid ⇒ Object
Returns the value of attribute partner_mid.
9 10 11 |
# File 'lib/makeleaps/client.rb', line 9 def partner_mid @partner_mid end |
#request ⇒ Object (readonly)
Returns the value of attribute request.
10 11 12 |
# File 'lib/makeleaps/client.rb', line 10 def request @request end |
Instance Method Details
#connect! ⇒ Object
19 20 21 22 |
# File 'lib/makeleaps/client.rb', line 19 def connect! @token_store ||= @auth_request.authenticate! @request = Makeleaps::Request::Generic.new(@token_store.access_token) end |
#disconnect! ⇒ Object
24 25 26 27 |
# File 'lib/makeleaps/client.rb', line 24 def disconnect! @auth_request.revoke!(@token_store.access_token) @token_store = nil end |