class Typesense::Collections
Constants
- RESOURCE_PATH
Public Class Methods
new(api_call)
click to toggle source
# File lib/typesense/collections.rb, line 7 def initialize(api_call) @api_call = api_call @collections = {} end
Public Instance Methods
[](collection_name)
click to toggle source
# File lib/typesense/collections.rb, line 20 def [](collection_name) @collections[collection_name] ||= Collection.new(collection_name, @api_call) end
create(schema)
click to toggle source
# File lib/typesense/collections.rb, line 12 def create(schema) @api_call.post(RESOURCE_PATH, schema) end
retrieve()
click to toggle source
# File lib/typesense/collections.rb, line 16 def retrieve @api_call.get(RESOURCE_PATH) end