Sha256: b85b07da6f39128fb78776170a79e467232923dc0bf434ef029ab671c8668964

Contents?: true

Size: 745 Bytes

Versions: 2

Compression:

Stored size: 745 Bytes

Contents

# frozen_string_literal: true

module EveOnline
  module ESI
    class CharacterNotifications < Base
      API_PATH = '/v5/characters/%<character_id>s/notifications/'

      attr_reader :character_id

      def initialize(options)
        super

        @character_id = options.fetch(:character_id)
      end

      def notifications
        @notifications ||=
          begin
            output = []
            response.each do |notification|
              output << Models::Notification.new(notification)
            end
            output
          end
      end

      def scope
        'esi-characters.read_notifications.v1'
      end

      def path
        format("#{ API_PATH }", character_id: character_id)
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
eve_online-0.29.0 lib/eve_online/esi/character_notifications.rb
eve_online-0.28.0 lib/eve_online/esi/character_notifications.rb