Class: Greeve::Corporation::StarbaseDetail

Inherits:
BaseItem
  • Object
show all
Defined in:
lib/greeve/corporation/starbase_detail.rb

Overview

Details for a starbase.

Attributes collapse

Instance Method Summary collapse

Methods inherited from BaseItem

attribute, #cache_expired?, #cached_until, endpoint, #inspect, namespace, #refresh, rowset, #to_s

Methods included from Helpers::AttributeToHash

#to_h

Constructor Details

#initialize(item_id, opts = {}) ⇒ StarbaseDetail

Returns a new instance of StarbaseDetail

Parameters:



51
52
53
54
55
# File 'lib/greeve/corporation/starbase_detail.rb', line 51

def initialize(item_id, opts = {})
  opts[:query_params] = { "itemID" => item_id }

  super(opts)
end

Instance Method Details

#fuelGreeve::Rowset

Parameters:

  • type_id (Integer)
  • quantity (Integer)

Returns:



45
46
47
48
# File 'lib/greeve/corporation/starbase_detail.rb', line 45

rowset :fuel, xpath: "eveapi/result/rowset[@name='fuel']" do
  attribute :type_id,  xpath: "@typeID",   type: :integer
  attribute :quantity, xpath: "@quantity", type: :integer
end

#online_timestampTime

Returns:

  • (Time)


13
# File 'lib/greeve/corporation/starbase_detail.rb', line 13

attribute :online_timestamp, xpath: "eveapi/result/onlineTimestamp/?[0]", type: :datetime

#stateInteger

Returns:

  • (Integer)


11
# File 'lib/greeve/corporation/starbase_detail.rb', line 11

attribute :state,            xpath: "eveapi/result/state/?[0]",           type: :integer

#state_timestampTime

Returns:

  • (Time)


12
# File 'lib/greeve/corporation/starbase_detail.rb', line 12

attribute :state_timestamp,  xpath: "eveapi/result/stateTimestamp/?[0]",  type: :datetime