Class: Greeve::Character::Locations
- Defined in:
- lib/greeve/character/locations.rb
Overview
Note:
Location and name of specific items that belong to the character of the api key. This call can be used to retrieve the player-set name of containers and ships.
Attributes collapse
Instance Method Summary collapse
-
#initialize(character_id, opts = {}) ⇒ Locations
constructor
A new instance of Locations.
Methods inherited from BaseItem
attribute, #cache_expired?, #cached_until, endpoint, #inspect, namespace, #refresh, rowset, #to_s
Methods included from Helpers::AttributeToHash
Constructor Details
#initialize(character_id, opts = {}) ⇒ Locations
Returns a new instance of Locations
25 26 27 28 29 30 31 32 33 |
# File 'lib/greeve/character/locations.rb', line 25 def initialize(character_id, opts = {}) ids = opts.delete(:ids) ids = [ids] unless ids.nil? || ids.is_a?(Array) opts[:query_params] = { "characterID" => character_id } opts[:query_params]["IDs"] = ids.join(",") if ids super(opts) end |
Instance Method Details
#locations ⇒ Greeve::Rowset
13 14 15 16 17 18 19 |
# File 'lib/greeve/character/locations.rb', line 13 rowset :locations, xpath: "eveapi/result/rowset[@name='locations']" do attribute :item_id, xpath: "@itemID", type: :integer attribute :item_name, xpath: "@itemName", type: :string attribute :x, xpath: "@x", type: :numeric attribute :y, xpath: "@y", type: :numeric attribute :z, xpath: "@z", type: :numeric end |