Sha256: d27a1741652cde87056f0684bcc8fb9264d2af6f826108065e5a61c3c4e81e50
Contents?: true
Size: 567 Bytes
Versions: 6
Compression:
Stored size: 567 Bytes
Contents
# frozen_string_literal: true module Typesense class Synonym def initialize(collection_name, synonym_id, api_call) @collection_name = collection_name @synonym_id = synonym_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)}#{Synonyms::RESOURCE_PATH}/#{URI.encode_www_form_component(@synonym_id)}" end end end
Version data entries
6 entries across 6 versions & 1 rubygems