Class: Greeve::Character::Notifications

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

Overview

Character notifications.

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

Returns a new instance of Notifications

Parameters:

  • character_id (Integer)

    EVE character ID



21
22
23
24
# File 'lib/greeve/character/notifications.rb', line 21

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

Instance Method Details

#notificationsGreeve::Rowset

Parameters:

  • notification_id (Integer)
  • type_id (Integer)
  • sender_id (Integer)
  • sender_name (String)
  • sent_date (Time)
  • read

Returns:



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

rowset :notifications, xpath: "eveapi/result/rowset[@name='notifications']" do
  attribute :notification_id, xpath: "@notificationID", type: :integer
  attribute :type_id,         xpath: "@typeID",         type: :integer
  attribute :sender_id,       xpath: "@senderID",       type: :integer
  attribute :sender_name,     xpath: "@senderName",     type: :string
  attribute :sent_date,       xpath: "@sentDate",       type: :datetime
  attribute :read,            xpath: "@read",           type: :boolean
end