Class: Greeve::Eve::CharacterName

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

Overview

Returns the names for a comma-separated list of owner IDs for characters, corporations, alliances, etc.

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

Returns a new instance of CharacterName.

Parameters:

  • ids (Array<Integer>)

    IDs of characters



20
21
22
23
24
25
26
# File 'lib/greeve/eve/character_name.rb', line 20

def initialize(*ids)
  opts = ids.last.is_a?(Hash) ? ids.pop : {}

  opts[:query_params] = { "IDs" => ids.join(",") }

  super(opts)
end