Sha256: 185821c97d8daeb330b17a72bab9c1e604abb540a25e12e3744d2dd70104c986
Contents?: true
Size: 710 Bytes
Versions: 4
Compression:
Stored size: 710 Bytes
Contents
# frozen_string_literal: true module Typesense class Collection attr_reader :documents, :overrides, :synonyms def initialize(name, api_call) @name = name @api_call = api_call @documents = Documents.new(@name, @api_call) @overrides = Overrides.new(@name, @api_call) @synonyms = Synonyms.new(@name, @api_call) end def retrieve @api_call.get(endpoint_path) end def update(update_schema) @api_call.patch(endpoint_path, update_schema) end def delete @api_call.delete(endpoint_path) end private def endpoint_path "#{Collections::RESOURCE_PATH}/#{URI.encode_www_form_component(@name)}" end end end
Version data entries
4 entries across 4 versions & 1 rubygems