Sha256: 41774b09b330eca864e2ab2fc8ef34e94435cf27f7d75bc23c87d9fcb1c45fc0

Contents?: true

Size: 696 Bytes

Versions: 1

Compression:

Stored size: 696 Bytes

Contents

module EveOnline
  module ESI
    class CharacterBlueprints < Base
      API_ENDPOINT = 'https://esi.tech.ccp.is/v2/characters/%<character_id>s/blueprints/?datasource=tranquility&page=1'.freeze

      attr_reader :character_id

      def initialize(options)
        super

        @character_id = options[:character_id]
      end

      def blueprints
        output = []
        response.each do |blueprint|
          output << Models::Blueprint.new(blueprint)
        end
        output
      end
      memoize :blueprints

      def scope
        'esi-characters.read_blueprints.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_blueprints.rb