Class: Reve::Classes::Notification

Inherits:
Object
  • Object
show all
Defined in:
lib/reve/classes.rb

Overview

Represents a Notification for Reve::API#personal_notifications Attributes

  • id ( Fixnum ) - The unique notification ID number.

  • notification_type_id ( Fixnum ) - The notification type indicates what has happened but not who performed the action in question nor upon whom the action was performed. See wiki.eve-id.net/APIv2_Char_Notifications_XML for a list of ids

  • sender_id ( Fixnum ) - TThe ID of the entity that sent the notification.

  • send_date ( Time ) - The ID of the entity that sent the notification.

  • read ( Boolean ) - Whether the notification has been read in the EVE client. This does not change when you get it through the API.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(elem) ⇒ Notification

:nodoc:



1586
1587
1588
1589
1590
1591
1592
# File 'lib/reve/classes.rb', line 1586

def initialize(elem) #:nodoc:
  @id = elem['notificationID'].to_i
  @notification_type_id = elem['typeID'].to_i
  @sender_id = elem['senderID'].to_i
  @send_date = elem['sentDate'].to_time
  @read = elem['read'] == '1'
end

Instance Attribute Details

#idObject (readonly)

Returns the value of attribute id.



1585
1586
1587
# File 'lib/reve/classes.rb', line 1585

def id
  @id
end

#nameObject (readonly)

Returns the value of attribute name.



1585
1586
1587
# File 'lib/reve/classes.rb', line 1585

def name
  @name
end

#notification_type_idObject (readonly)

Returns the value of attribute notification_type_id.



1585
1586
1587
# File 'lib/reve/classes.rb', line 1585

def notification_type_id
  @notification_type_id
end

#readObject (readonly)

Returns the value of attribute read.



1585
1586
1587
# File 'lib/reve/classes.rb', line 1585

def read
  @read
end

#send_dateObject (readonly)

Returns the value of attribute send_date.



1585
1586
1587
# File 'lib/reve/classes.rb', line 1585

def send_date
  @send_date
end

#sender_idObject (readonly)

Returns the value of attribute sender_id.



1585
1586
1587
# File 'lib/reve/classes.rb', line 1585

def sender_id
  @sender_id
end