Class: Greeve::Character::CalendarEventAttendees

Inherits:
BaseItem
  • Object
show all
Defined in:
lib/greeve/character/calendar_event_attendees.rb

Overview

A list of all invited attendees for a given event.

Attributes collapse

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(character_id, event_ids, opts = {}) ⇒ CalendarEventAttendees

Returns a new instance of CalendarEventAttendees

Parameters:

  • character_id (Integer)

    EVE character ID

  • event_ids (Array<Integer>, Integer)

    either a single event ID, or an array of event IDs



21
22
23
24
25
26
27
28
29
30
# File 'lib/greeve/character/calendar_event_attendees.rb', line 21

def initialize(character_id, event_ids, opts = {})
  event_ids = [event_ids] unless event_ids.is_a?(Array)

  opts[:query_params] = {
    "characterID" => character_id,
    "eventIDs" => event_ids.join(",")
  }

  super(opts)
end

Instance Method Details

#event_attendeesGreeve::Rowset

Parameters:

  • event_id (Integer)
  • character_id (Integer)
  • character_name (String)
  • response (String)

Returns:



11
12
13
14
15
16
# File 'lib/greeve/character/calendar_event_attendees.rb', line 11

rowset :event_attendees, xpath: "eveapi/result/rowset[@name='eventAttendees']" do
  attribute :event_id,       xpath: "@eventID",       type: :integer
  attribute :character_id,   xpath: "@characterID",   type: :integer
  attribute :character_name, xpath: "@characterName", type: :string
  attribute :response,       xpath: "@response",      type: :string
end