Class: Greeve::Character::Blueprints

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

Overview

Blueprints in a character's inventory.

Constant Summary

BPO =

Blueprint original

-1
BPC =

Blueprint copy

-2

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, opts = {}) ⇒ Blueprints

Returns a new instance of Blueprints

Parameters:

  • character_id (Integer)

    EVE character ID



29
30
31
32
# File 'lib/greeve/character/blueprints.rb', line 29

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

Instance Method Details

#blueprintsGreeve::Rowset

Parameters:

  • item_id (Integer)
  • location_id (Integer)
  • type_id (Integer)
  • type_name (String)
  • quantity (Integer)
  • flag_id (Integer)
  • time_efficiency (Integer)
  • material_efficiency (Integer)
  • runs (Integer)

Returns:



16
17
18
19
20
21
22
23
24
25
26
# File 'lib/greeve/character/blueprints.rb', line 16

rowset :blueprints, xpath: "eveapi/result/rowset[@name='blueprints']" do
  attribute :item_id,             xpath: "@itemID",             type: :integer
  attribute :location_id,         xpath: "@locationID",         type: :integer
  attribute :type_id,             xpath: "@typeID",             type: :integer
  attribute :type_name,           xpath: "@typeName",           type: :string
  attribute :quantity,            xpath: "@quantity",           type: :integer
  attribute :flag_id,             xpath: "@flagID",             type: :integer
  attribute :time_efficiency,     xpath: "@timeEfficiency",     type: :integer
  attribute :material_efficiency, xpath: "@materialEfficiency", type: :integer
  attribute :runs,                xpath: "@runs",               type: :integer
end