Class: Greeve::Character::PlanetaryRoutes

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

Overview

Planetary routes 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 = {}) ⇒ PlanetaryRoutes

Returns a new instance of PlanetaryRoutes

Parameters:



28
29
30
31
32
33
34
35
# File 'lib/greeve/character/planetary_routes.rb', line 28

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

  super(opts)
end

Instance Method Details

#routesGreeve::Rowset

Parameters:

  • route_id (Integer)
  • source_pin_id (Integer)
  • destination_pin_id (Integer)
  • content_type_id (Integer)
  • content_type_name (String)
  • quantity (Integer)
  • waypoint_1 (Integer)
  • waypoint_2 (Integer)
  • waypoint_3 (Integer)
  • waypoint_4 (Integer)
  • waypoint_5 (Integer)

Returns:



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

rowset :routes, xpath: "eveapi/result/rowset[@name='routes']" do
  attribute :route_id,           xpath: "@routeID",          type: :integer
  attribute :source_pin_id,      xpath: "@sourcePinID",      type: :integer
  attribute :destination_pin_id, xpath: "@destinationPinID", type: :integer
  attribute :content_type_id,    xpath: "@contentTypeID",    type: :integer
  attribute :content_type_name,  xpath: "@contentTypeName",  type: :string
  attribute :quantity,           xpath: "@quantity",         type: :integer
  attribute :waypoint_1,         xpath: "@waypoint1",        type: :integer
  attribute :waypoint_2,         xpath: "@waypoint2",        type: :integer
  attribute :waypoint_3,         xpath: "@waypoint3",        type: :integer
  attribute :waypoint_4,         xpath: "@waypoint4",        type: :integer
  attribute :waypoint_5,         xpath: "@waypoint5",        type: :integer
end