Class: Greeve::Corporation::Locations
- Defined in:
- lib/greeve/corporation/locations.rb
Overview
Note:
Location of an item or character.
Attributes collapse
Instance Method Summary collapse
-
#initialize(*ids, 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(*ids, opts = {}) ⇒ Locations
Returns a new instance of Locations
22 23 24 25 26 27 28 |
# File 'lib/greeve/corporation/locations.rb', line 22 def initialize(*ids) opts = ids.last.is_a?(Hash) ? ids.pop : {} opts[:query_params] = { "IDs" => ids.join(",") } super(opts) end |
Instance Method Details
#locations ⇒ Greeve::Rowset
11 12 13 14 15 16 17 |
# File 'lib/greeve/corporation/locations.rb', line 11 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: :integer attribute :y, xpath: "@y", type: :integer attribute :z, xpath: "@z", type: :integer end |