Class: Oneview::Client
- Inherits:
-
Object
- Object
- Oneview::Client
- Extended by:
- ClassMethods
- Includes:
- HTTParty
- Defined in:
- lib/oneview/client.rb
Direct Known Subclasses
Defined Under Namespace
Classes: NoAccessTokenError, Response
Instance Attribute Summary collapse
-
#access_token ⇒ Object
Returns the value of attribute access_token.
Instance Method Summary collapse
- #contacts ⇒ Object
-
#initialize(access_token) ⇒ Client
constructor
A new instance of Client.
Methods included from ClassMethods
Constructor Details
#initialize(access_token) ⇒ Client
Returns a new instance of Client.
18 19 20 21 |
# File 'lib/oneview/client.rb', line 18 def initialize(access_token) raise NoAccessTokenError if access_token.nil? || access_token.strip == "" @access_token = access_token end |
Instance Attribute Details
#access_token ⇒ Object
Returns the value of attribute access_token.
16 17 18 |
# File 'lib/oneview/client.rb', line 16 def access_token @access_token end |
Instance Method Details
#contacts ⇒ Object
23 24 25 |
# File 'lib/oneview/client.rb', line 23 def contacts Oneview::Api::Contacts.new(@access_token) end |