Sha256: 9abfbcacc05087220cea616dcee6d75e2ebc3bd7248f8983505fdf09a6346bbc
Contents?: true
Size: 762 Bytes
Versions: 1
Compression:
Stored size: 762 Bytes
Contents
# frozen_string_literal: true module Typesense class Overrides RESOURCE_PATH = '/overrides' def initialize(configuration, collection_name) @configuration = configuration @collection_name = collection_name @overrides = {} end def create(params) ApiCall.new(@configuration).put(endpoint_path, params) end def retrieve ApiCall.new(@configuration).get(endpoint_path) end def [](override_id) @overrides[override_id] ||= Override.new(@configuration, @collection_name, override_id) end private def endpoint_path(operation = nil) "#{Collections::RESOURCE_PATH}/#{@collection_name}#{Overrides::RESOURCE_PATH}#{operation.nil? ? '' : '/' + operation}" end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
typesense-0.2.0 | lib/typesense/overrides.rb |