Sha256: 05f49001e0d00aab794a45f1fec468ac72fc876f8a614f18e716bec0f64ec755

Contents?: true

Size: 622 Bytes

Versions: 1

Compression:

Stored size: 622 Bytes

Contents

require 'forwardable'

module EveOnline
  module ESI
    class AllianceIcon < Base
      extend Forwardable

      API_ENDPOINT = 'https://esi.tech.ccp.is/v1/alliances/%<alliance_id>s/icons/?datasource=tranquility'.freeze

      attr_reader :alliance_id

      def initialize(options)
        super

        @alliance_id = options[:alliance_id]
      end

      def_delegators :model, :as_json, :small, :medium

      def model
        Models::AllianceIcon.new(response)
      end
      memoize :model

      def scope; end

      def url
        format(API_ENDPOINT, alliance_id: alliance_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/alliance_icon.rb