Class: Greeve::Eve::CharacterID
- Defined in:
- lib/greeve/eve/character_id.rb
Overview
Note:
Retrieves character IDs based on names.
Attributes collapse
Instance Method Summary collapse
-
#initialize(*names, opts = {}) ⇒ CharacterID
constructor
A new instance of CharacterID.
Methods inherited from BaseItem
attribute, #cache_expired?, #cached_until, endpoint, #inspect, namespace, #refresh, rowset, #to_s
Methods included from Helpers::AttributeToHash
Constructor Details
#initialize(*names, opts = {}) ⇒ CharacterID
Returns a new instance of CharacterID
19 20 21 22 23 24 25 |
# File 'lib/greeve/eve/character_id.rb', line 19 def initialize(*names) opts = names.last.is_a?(Hash) ? names.pop : {} opts[:query_params] = { "names" => names.join(",") } super(opts) end |
Instance Method Details
#characters ⇒ Greeve::Rowset
11 12 13 14 |
# File 'lib/greeve/eve/character_id.rb', line 11 rowset :characters, xpath: "eveapi/result/rowset[@name='characters']" do attribute :name, xpath: "@name", type: :string attribute :character_id, xpath: "@characterID", type: :integer end |