Class: Greeve::Character::ContactNotifications

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

Overview

Notifications received when having been added to someone’s contact list.

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

Returns a new instance of ContactNotifications

Parameters:

  • character_id (Integer)

    EVE character ID



20
21
22
23
# File 'lib/greeve/character/contact_notifications.rb', line 20

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

Instance Method Details

#contact_notificationsGreeve::Rowset

Parameters:

  • notification_id (Integer)
  • sender_id (Integer)
  • sender_name (String)
  • sent_date (Time)
  • message_data

Returns:



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

rowset :contact_notifications, xpath: "eveapi/result/rowset[@name='contactNotifications']" do
  attribute :notification_id, xpath: "@notificationID", type: :integer
  attribute :sender_id,       xpath: "@senderID",       type: :integer
  attribute :sender_name,     xpath: "@senderName",     type: :string
  attribute :sent_date,       xpath: "@sentDate",       type: :datetime
  attribute :message_data,    xpath: "@messageData",    type: :hash
end