Module: Hetzner::API::Server

Included in:
Hetzner::API
Defined in:
lib/hetzner/api/server.rb

Instance Method Summary collapse

Instance Method Details

#server!(server_ip, args = {}) ⇒ Object

update server settings (e.g. server_name)


15
16
17
18
# File 'lib/hetzner/api/server.rb', line 15

def server!(server_ip, args = {})
  path = "/server/#{server_ip}"
  perform_post path, :query => args
end

#server?(server_ip) ⇒ Boolean

returns a list of all servers or just for a specific server ip

Returns:

  • (Boolean)

10
11
12
# File 'lib/hetzner/api/server.rb', line 10

def server?(server_ip)
  get_server_or_servers server_ip
end

#servers?Boolean

returns a list of all servers of the customer

Returns:

  • (Boolean)

5
6
7
# File 'lib/hetzner/api/server.rb', line 5

def servers?
  get_server_or_servers
end