Sha256: 28db1f5edb16dddd292598a83f45cf1679073c48bbe8571cdfb86c19773c30cf

Contents?: true

Size: 722 Bytes

Versions: 2

Compression:

Stored size: 722 Bytes

Contents

# frozen_string_literal: true

module EveOnline
  module ESI
    class CharacterLoyaltyPoints < Base
      API_PATH = '/v1/characters/%<character_id>s/loyalty/points/'

      attr_reader :character_id

      def initialize(options)
        super

        @character_id = options.fetch(:character_id)
      end

      def loyalty_points
        @loyalty_points ||=
          begin
            output = []
            response.each do |lp|
              output << Models::LoyaltyPoint.new(lp)
            end
            output
          end
      end

      def scope
        'esi-characters.read_loyalty.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_loyalty_points.rb
eve_online-0.28.0 lib/eve_online/esi/character_loyalty_points.rb