Class: HCloud::Client

Inherits:
Object
  • Object
show all
Defined in:
lib/hcloud/client.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(access_token:, endpoint: "https://api.hetzner.cloud/v1", logger: Logger.new("/dev/null"), rate_limit: false) ⇒ Client

Returns a new instance of Client.



24
25
26
27
28
29
# File 'lib/hcloud/client.rb', line 24

def initialize(access_token:, endpoint: "https://api.hetzner.cloud/v1", logger: Logger.new("/dev/null"), rate_limit: false)
  @access_token = access_token
  @endpoint = endpoint
  @logger = logger
  @rate_limit = rate_limit
end

Instance Attribute Details

#access_tokenObject (readonly)

Returns the value of attribute access_token.



22
23
24
# File 'lib/hcloud/client.rb', line 22

def access_token
  @access_token
end

#endpointObject (readonly)

Returns the value of attribute endpoint.



22
23
24
# File 'lib/hcloud/client.rb', line 22

def endpoint
  @endpoint
end

#loggerObject (readonly)

Returns the value of attribute logger.



22
23
24
# File 'lib/hcloud/client.rb', line 22

def logger
  @logger
end

#rate_limitObject (readonly)

Returns the value of attribute rate_limit.



22
23
24
# File 'lib/hcloud/client.rb', line 22

def rate_limit
  @rate_limit
end