Sha256: bcea9bbebc5a85512a6b69c066f9e7712cee5b5f912dd6e56100decf1e32507a

Contents?: true

Size: 584 Bytes

Versions: 4

Compression:

Stored size: 584 Bytes

Contents

# frozen_string_literal: true

module Typesense
  class Override
    def initialize(collection_name, override_id, api_call)
      @collection_name = collection_name
      @override_id     = override_id
      @api_call        = api_call
    end

    def retrieve
      @api_call.get(endpoint_path)
    end

    def delete
      @api_call.delete(endpoint_path)
    end

    private

    def endpoint_path
      "#{Collections::RESOURCE_PATH}/#{URI.encode_www_form_component(@collection_name)}#{Overrides::RESOURCE_PATH}/#{URI.encode_www_form_component(@override_id)}"
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
typesense-3.0.0.rc1 lib/typesense/override.rb
typesense-2.1.0 lib/typesense/override.rb
typesense-2.1.0.rc2 lib/typesense/override.rb
typesense-2.1.0.rc1 lib/typesense/override.rb