Class: Packet::Client
- Inherits:
-
Object
- Object
- Packet::Client
- Includes:
- Devices, Facilities, OperatingSystems, Plans, Projects, SshKeys, Users
- Defined in:
- lib/packet/client.rb,
lib/packet/client/plans.rb,
lib/packet/client/users.rb,
lib/packet/client/devices.rb,
lib/packet/client/projects.rb,
lib/packet/client/ssh_keys.rb,
lib/packet/client/facilities.rb,
lib/packet/client/operating_systems.rb
Defined Under Namespace
Modules: Devices, Facilities, OperatingSystems, Plans, Projects, SshKeys, Users
Instance Attribute Summary collapse
-
#auth_token ⇒ Object
Returns the value of attribute auth_token.
-
#consumer_token ⇒ Object
Returns the value of attribute consumer_token.
-
#url ⇒ Object
Returns the value of attribute url.
Instance Method Summary collapse
-
#initialize(auth_token = nil, consumer_token = nil, url = nil) ⇒ Client
constructor
A new instance of Client.
- #inspect ⇒ Object
Methods included from Users
Methods included from SshKeys
#create_ssh_key, #delete_ssh_key, #get_ssh_key, #list_ssh_keys, #update_ssh_key
Methods included from Projects
#create_project, #delete_project, #get_project, #list_projects, #update_project
Methods included from Plans
Methods included from OperatingSystems
Methods included from Facilities
Methods included from Devices
#create_device, #delete_device, #get_device, #list_devices, #update_device
Constructor Details
#initialize(auth_token = nil, consumer_token = nil, url = nil) ⇒ Client
Returns a new instance of Client.
15 16 17 18 19 |
# File 'lib/packet/client.rb', line 15 def initialize(auth_token = nil, consumer_token = nil, url = nil) self.url = url || Packet.configuration.url self.auth_token = auth_token || Packet.configuration.auth_token self.consumer_token = consumer_token || Packet.configuration.consumer_token end |
Instance Attribute Details
#auth_token ⇒ Object
Returns the value of attribute auth_token.
13 14 15 |
# File 'lib/packet/client.rb', line 13 def auth_token @auth_token end |
#consumer_token ⇒ Object
Returns the value of attribute consumer_token.
13 14 15 |
# File 'lib/packet/client.rb', line 13 def consumer_token @consumer_token end |
#url ⇒ Object
Returns the value of attribute url.
13 14 15 |
# File 'lib/packet/client.rb', line 13 def url @url end |
Instance Method Details
#inspect ⇒ Object
28 29 30 |
# File 'lib/packet/client.rb', line 28 def inspect %(#<#{self.class}:#{format('%014x', (object_id << 1))}>) end |