Class: Greeve::Eve::CharacterID

Inherits:
BaseItem
  • Object
show all
Defined in:
lib/greeve/eve/character_id.rb

Overview

Retrieves character IDs based on names.

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(*names, opts = {}) ⇒ CharacterID

Returns a new instance of CharacterID.

Parameters:

  • names (Array<Integer>)

    names of characters



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