Sha256: 001b7486ca0b0e38463db18c531e6d4ca7da6ae1dc6ab14760f4d579c4b41a96

Contents?: true

Size: 775 Bytes

Versions: 4

Compression:

Stored size: 775 Bytes

Contents

# frozen_string_literal: true

require 'forwardable'

module EveOnline
  module ESI
    class UniverseGraphic < Base
      extend Forwardable

      API_ENDPOINT = 'https://esi.evetech.net/v1/universe/graphics/%<graphic_id>s/?datasource=%<datasource>s'

      attr_reader :id

      def initialize(options)
        super

        @id = options.fetch(:id)
      end

      def_delegators :model, :as_json, :collision_file, :graphic_file,
                     :graphic_id, :icon_folder, :sof_dna, :sof_fation_name,
                     :sof_hull_name, :sof_race_name

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

      def scope; end

      def url
        format(API_ENDPOINT, graphic_id: 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/universe_graphic.rb
eve_online-0.22.0 lib/eve_online/esi/universe_graphic.rb
eve_online-0.21.0 lib/eve_online/esi/universe_graphic.rb
eve_online-0.20.0 lib/eve_online/esi/universe_graphic.rb