Class: Greeve::Character::MailBodies
- Defined in:
- lib/greeve/character/mail_bodies.rb
Overview
Note:
Bodies of eve mail messages sent to the character.
Attributes collapse
Instance Method Summary collapse
-
#initialize(character_id, *message_ids, opts = {}) ⇒ MailBodies
constructor
A new instance of MailBodies.
Methods inherited from BaseItem
attribute, #cache_expired?, #cached_until, endpoint, #inspect, namespace, #refresh, rowset, #to_s
Methods included from Helpers::AttributeToHash
Constructor Details
#initialize(character_id, *message_ids, opts = {}) ⇒ MailBodies
Returns a new instance of MailBodies
21 22 23 24 25 26 27 28 29 30 |
# File 'lib/greeve/character/mail_bodies.rb', line 21 def initialize(character_id, *) opts = .last.is_a?(Hash) ? .pop : {} opts[:query_params] = { "characterID" => character_id, "IDs" => .join(","), } super(opts) end |
Instance Method Details
#messages ⇒ Greeve::Rowset
11 12 13 14 |
# File 'lib/greeve/character/mail_bodies.rb', line 11 rowset :messages, xpath: "eveapi/result/rowset[@name='messages']" do attribute :message_id, xpath: "@messageID", type: :integer attribute :message_text, xpath: "?[0]", type: :string end |