Sha256: 0df497d73e08e1ce48d6d1d0572122a1b2fd93c88d9f54cb543430c4c66621bf

Contents?: true

Size: 690 Bytes

Versions: 1

Compression:

Stored size: 690 Bytes

Contents

module EveOnline
  module ESI
    class CharacterLoyaltyPoints < Base
      API_ENDPOINT = 'https://esi.tech.ccp.is/v1/characters/%<character_id>s/loyalty/points/?datasource=tranquility'.freeze

      attr_reader :character_id

      def initialize(options)
        super

        @character_id = options[:character_id]
      end

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

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

      def url
        format(API_ENDPOINT, character_id: character_id)
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
eve_online-0.14.0 lib/eve_online/esi/character_loyalty_points.rb