Class: Greeve::Character::UpcomingCalendarEvents

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

Overview

Character upcoming calendar events.

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, opts = {}) ⇒ UpcomingCalendarEvents

Returns a new instance of UpcomingCalendarEvents

Parameters:

  • character_id (Integer)

    EVE character ID



25
26
27
28
# File 'lib/greeve/character/upcoming_calendar_events.rb', line 25

def initialize(character_id, opts = {})
  opts[:query_params] = { "characterID" => character_id }
  super(opts)
end

Instance Method Details

#upcoming_eventsGreeve::Rowset

Parameters:

  • event_id (Integer)
  • owner_id (Integer)
  • owner_name (String)
  • owner_type_id (Integer)
  • event_date (Time)
  • event_title (String)
  • duration (Integer)
  • importance
  • response (String)
  • event_text (String)

Returns:



11
12
13
14
15
16
17
18
19
20
21
22
# File 'lib/greeve/character/upcoming_calendar_events.rb', line 11

rowset :upcoming_events, xpath: "eveapi/result/rowset[@name='upcomingEvents']" do
  attribute :event_id,      xpath: "@eventID",     type: :integer
  attribute :owner_id,      xpath: "@ownerID",     type: :integer
  attribute :owner_name,    xpath: "@ownerName",   type: :string
  attribute :owner_type_id, xpath: "@ownerTypeID", type: :integer
  attribute :event_date,    xpath: "@eventDate",   type: :datetime
  attribute :event_title,   xpath: "@eventTitle",  type: :string
  attribute :duration,      xpath: "@duration",    type: :integer
  attribute :importance,    xpath: "@importance",  type: :boolean
  attribute :response,      xpath: "@response",    type: :string
  attribute :event_text,    xpath: "@eventText",   type: :string
end