Sha256: 44076163a3d274c0da7a663ed717d011a215e5dbf3a611a83ede391f4b382f04

Contents?: true

Size: 685 Bytes

Versions: 4

Compression:

Stored size: 685 Bytes

Contents

# frozen_string_literal: true

require 'forwardable'

module EveOnline
  module ESI
    class UniverseGroup < Base
      extend Forwardable

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

      attr_reader :id

      def initialize(options = {})
        super

        @id = options.fetch(:id)
      end

      def_delegators :model, :as_json, :category_id, :group_id, :name,
                     :published, :type_ids

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

      def scope; end

      def url
        format(API_ENDPOINT, group_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_group.rb
eve_online-0.22.0 lib/eve_online/esi/universe_group.rb
eve_online-0.21.0 lib/eve_online/esi/universe_group.rb
eve_online-0.20.0 lib/eve_online/esi/universe_group.rb