class Typesense::Document
Public Class Methods
new(collection_name, document_id, api_call)
click to toggle source
# File lib/typesense/document.rb, line 5 def initialize(collection_name, document_id, api_call) @collection_name = collection_name @document_id = document_id @api_call = api_call end
Public Instance Methods
delete()
click to toggle source
# File lib/typesense/document.rb, line 15 def delete @api_call.delete(endpoint_path) end
retrieve()
click to toggle source
# File lib/typesense/document.rb, line 11 def retrieve @api_call.get(endpoint_path) end
update(partial_document, options = {})
click to toggle source
# File lib/typesense/document.rb, line 19 def update(partial_document, options = {}) @api_call.patch(endpoint_path, partial_document, options) end
Private Instance Methods
endpoint_path()
click to toggle source
# File lib/typesense/document.rb, line 25 def endpoint_path "#{Collections::RESOURCE_PATH}/#{@collection_name}#{Documents::RESOURCE_PATH}/#{@document_id}" end