Sha256: c9c1ee56e43223fc426a31c51a03ffbcfcea683414297b147ed4e51282cf7ef3

Contents?: true

Size: 1.05 KB

Versions: 1

Compression:

Stored size: 1.05 KB

Contents

require_relative "../base_item"

module Greeve
  module Character
    # Character notifications.
    #
    # @see https://eveonline-third-party-documentation.readthedocs.io/en/latest/xmlapi/character/char_notifications.html
    class Notifications < Greeve::BaseItem
      endpoint "char/Notifications"

      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

      # @param character_id [Integer] EVE character ID
      def initialize(character_id, opts = {})
        opts[:query_params] = { "characterID" => character_id }
        super(opts)
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
greeve-1.0.0 lib/greeve/character/notifications.rb