Class: Ivapi::Client::Hosting

Inherits:
Base
  • Object
show all
Defined in:
lib/ivapi/client/hosting.rb

Instance Attribute Summary collapse

Attributes inherited from Base

#client

Instance Method Summary collapse

Methods inherited from Base

#get

Constructor Details

#initialize(client, hosting_id) ⇒ Hosting

Returns a new instance of Hosting.



8
9
10
11
# File 'lib/ivapi/client/hosting.rb', line 8

def initialize(client, hosting_id)
  super(client)
  @hosting_id = hosting_id
end

Instance Attribute Details

#hosting_idObject (readonly)

Returns the value of attribute hosting_id.



6
7
8
# File 'lib/ivapi/client/hosting.rb', line 6

def hosting_id
  @hosting_id
end

Instance Method Details

#informationObject Also known as: info



13
14
15
16
# File 'lib/ivapi/client/hosting.rb', line 13

def information
  params = { command: 'hosting_info', id: hosting_id }
  get('/json.php', params)
end