Class: EveOnline::ESI::CharacterMailLabels
- Inherits:
-
Base
- Object
- Base
- EveOnline::ESI::CharacterMailLabels
- Defined in:
- lib/eve_online/esi/character_mail_labels.rb
Constant Summary collapse
- API_PATH =
"/v3/characters/%<character_id>s/mail/labels/"
Instance Attribute Summary collapse
-
#character_id ⇒ Object
readonly
Returns the value of attribute character_id.
Instance Method Summary collapse
-
#initialize(options) ⇒ CharacterMailLabels
constructor
A new instance of CharacterMailLabels.
- #labels ⇒ Object
- #path ⇒ Object
- #scope ⇒ Object
- #total_unread_count ⇒ Object
Constructor Details
#initialize(options) ⇒ CharacterMailLabels
Returns a new instance of CharacterMailLabels.
10 11 12 13 14 |
# File 'lib/eve_online/esi/character_mail_labels.rb', line 10 def initialize() super @character_id = .fetch(:character_id) end |
Instance Attribute Details
#character_id ⇒ Object (readonly)
Returns the value of attribute character_id.
8 9 10 |
# File 'lib/eve_online/esi/character_mail_labels.rb', line 8 def character_id @character_id end |
Instance Method Details
#labels ⇒ Object
16 17 18 19 20 21 22 23 24 25 |
# File 'lib/eve_online/esi/character_mail_labels.rb', line 16 def labels @labels ||= begin output = [] response.fetch("labels").each do |label| output << Models::MailLabel.new(label) end output end end |
#path ⇒ Object
35 36 37 |
# File 'lib/eve_online/esi/character_mail_labels.rb', line 35 def path format(API_PATH, character_id: character_id) end |
#scope ⇒ Object
31 32 33 |
# File 'lib/eve_online/esi/character_mail_labels.rb', line 31 def scope "esi-mail.read_mail.v1" end |
#total_unread_count ⇒ Object
27 28 29 |
# File 'lib/eve_online/esi/character_mail_labels.rb', line 27 def total_unread_count response["total_unread_count"] end |