Sha256: 18ecd77bdcf7f8553f2b65a1569ba62b914732a78d1cd896638608febaf91db0

Contents?: true

Size: 693 Bytes

Versions: 4

Compression:

Stored size: 693 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/?datasource=%<datasource>s'

      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 url
        format("#{ API_HOST }#{ API_PATH }", character_id: character_id, datasource: datasource)
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
eve_online-0.27.0 lib/eve_online/esi/character_portrait.rb
eve_online-0.26.0 lib/eve_online/esi/character_portrait.rb
eve_online-0.25.0 lib/eve_online/esi/character_portrait.rb
eve_online-0.24.0 lib/eve_online/esi/character_portrait.rb