Sha256: 2e1027e78f46c9cfc5e3f32c033db29b1a196e871d39a0d7ff49951099b90a1b

Contents?: true

Size: 667 Bytes

Versions: 1

Compression:

Stored size: 667 Bytes

Contents

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

      attr_reader :character_id

      def initialize(token, character_id)
        super(token)
        @character_id = 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
        API_ENDPOINT % character_id
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

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