Class: Greeve::Eve::CharacterAffiliation

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

Overview

Corporations, alliances, and factions the character(s) are members of.

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 = {}) ⇒ CharacterAffiliation

Returns a new instance of CharacterAffiliation.

Parameters:

  • ids (Array<Integer>)

    IDs of characters



25
26
27
28
29
30
31
# File 'lib/greeve/eve/character_affiliation.rb', line 25

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

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

  super(opts)
end