Sha256: a2669691d6d7a3f1e2ef82be5492b572d05daf1de7d9cbddb741dc9435b2fb7b

Contents?: true

Size: 678 Bytes

Versions: 2

Compression:

Stored size: 678 Bytes

Contents

# frozen_string_literal: true

require 'forwardable'

module EveOnline
  module ESI
    class UniverseCategory < Base
      extend Forwardable

      API_PATH = '/v1/universe/categories/%<category_id>s/'

      attr_reader :id

      def initialize(options)
        super

        @id = options.fetch(:id)
      end

      def_delegators :model, :as_json, :category_id, :name, :published,
                     :group_ids

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

      def scope; end

      def additation_query_params
        [:language]
      end

      def path
        format("#{ API_PATH }", category_id: 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/universe_category.rb
eve_online-0.28.0 lib/eve_online/esi/universe_category.rb