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.



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

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

Instance Attribute Details

#hosting_id ⇒ Object (readonly)

Returns the value of attribute hosting_id.



4
5
6
# File 'lib/ivapi/client/hosting.rb', line 4

def hosting_id
  @hosting_id
end

Instance Method Details

#information ⇒ Object Also known as: info



11
12
13
14
# File 'lib/ivapi/client/hosting.rb', line 11

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