Sha256: e3b8c68424095a49265ff327463c3e80a113c52b638ea29970e2b4985c8f75b3
Contents?: true
Size: 522 Bytes
Versions: 12
Compression:
Stored size: 522 Bytes
Contents
# frozen_string_literal: true module Typesense class Document def initialize(collection_name, document_id, api_call) @collection_name = collection_name @document_id = document_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}/#{@collection_name}#{Documents::RESOURCE_PATH}/#{@document_id}" end end end
Version data entries
12 entries across 12 versions & 1 rubygems