Sha256: b6e77b5d4b73c3f9367d5188bf2591406b5d4ff2615af9e54bd2d4f6f1c434b3

Contents?: true

Size: 679 Bytes

Versions: 4

Compression:

Stored size: 679 Bytes

Contents

# frozen_string_literal: true

require 'forwardable'

module EveOnline
  module ESI
    class AllianceIcon < Base
      extend Forwardable

      API_ENDPOINT = 'https://esi.evetech.net/v1/alliances/%<alliance_id>s/icons/?datasource=%<datasource>s'

      attr_reader :alliance_id

      def initialize(options)
        super

        @alliance_id = options.fetch(:alliance_id)
      end

      def_delegators :model, :as_json, :icon_small, :icon_medium

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

      def scope; end

      def url
        format(API_ENDPOINT, alliance_id: alliance_id, datasource: datasource)
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
eve_online-0.23.0 lib/eve_online/esi/alliance_icon.rb
eve_online-0.22.0 lib/eve_online/esi/alliance_icon.rb
eve_online-0.21.0 lib/eve_online/esi/alliance_icon.rb
eve_online-0.20.0 lib/eve_online/esi/alliance_icon.rb