Sha256: fdf9d163ff9ab1c76a8c4845c1b79737966e94e71454f7d5785f6d502a5e39b8

Contents?: true

Size: 631 Bytes

Versions: 2

Compression:

Stored size: 631 Bytes

Contents

# frozen_string_literal: true

require 'forwardable'

module EveOnline
  module ESI
    class CharacterPortrait < Base
      extend Forwardable

      API_PATH = '/v2/characters/%<character_id>s/portrait/'

      attr_reader :character_id

      def initialize(options)
        super

        @character_id = options.fetch(:character_id)
      end

      def_delegators :model, :as_json, :medium, :large, :huge, :small

      def model
        @model ||= Models::CharacterPortrait.new(response)
      end

      def scope; 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_portrait.rb
eve_online-0.28.0 lib/eve_online/esi/character_portrait.rb