Class: Greeve::Character::PlanetaryPins

Inherits:
BaseItem
  • Object
show all
Defined in:
lib/greeve/character/planetary_pins.rb

Overview

Planetary pins for colonies owned by character.

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(character_id, planet_id, opts = {}) ⇒ PlanetaryPins

Returns a new instance of PlanetaryPins

Parameters:



31
32
33
34
35
36
37
38
# File 'lib/greeve/character/planetary_pins.rb', line 31

def initialize(character_id, planet_id, opts = {})
  opts[:query_params] = {
    "characterID" => character_id,
    "planetID" => planet_id,
  }

  super(opts)
end

Instance Method Details

#pinsGreeve::Rowset

Parameters:

  • pin_id (Integer)
  • type_id (Integer)
  • type_name (String)
  • schematic_id (Integer)
  • last_launch_time (Time)
  • cycle_time (Integer)
  • quantity_per_cycle (Integer)
  • install_time (Time)
  • expiry_time (Time)
  • content_type_id (Integer)
  • content_type_name (String)
  • content_quantity (Integer)
  • longitude (BigDecimal)
  • latitude (BigDecimal)

Returns:



11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# File 'lib/greeve/character/planetary_pins.rb', line 11

rowset :pins, xpath: "eveapi/result/rowset[@name='pins']" do
  attribute :pin_id,             xpath: "@pinID",            type: :integer
  attribute :type_id,            xpath: "@typeID",           type: :integer
  attribute :type_name,          xpath: "@typeName",         type: :string
  attribute :schematic_id,       xpath: "@schematicID",      type: :integer
  attribute :last_launch_time,   xpath: "@lastLaunchTime",   type: :datetime
  attribute :cycle_time,         xpath: "@cycleTime",        type: :integer
  attribute :quantity_per_cycle, xpath: "@quantityPerCycle", type: :integer
  attribute :install_time,       xpath: "@installTime",      type: :datetime
  attribute :expiry_time,        xpath: "@expiryTime",       type: :datetime
  attribute :content_type_id,    xpath: "@contentTypeID",    type: :integer
  attribute :content_type_name,  xpath: "@contentTypeName",  type: :string
  attribute :content_quantity,   xpath: "@contentQuantity",  type: :integer
  attribute :longitude,          xpath: "@longitude",        type: :numeric
  attribute :latitude,           xpath: "@latitude",         type: :numeric
end