Class: Typesense::CurationSet
- Inherits:
-
Object
- Object
- Typesense::CurationSet
- Defined in:
- lib/typesense/curation_set.rb
Instance Attribute Summary collapse
-
#items ⇒ Object
readonly
Returns the value of attribute items.
Instance Method Summary collapse
- #delete ⇒ Object
-
#initialize(curation_set_name, api_call) ⇒ CurationSet
constructor
A new instance of CurationSet.
- #retrieve ⇒ Object
- #upsert(curation_set_data) ⇒ Object
Constructor Details
#initialize(curation_set_name, api_call) ⇒ CurationSet
Returns a new instance of CurationSet.
7 8 9 10 11 |
# File 'lib/typesense/curation_set.rb', line 7 def initialize(curation_set_name, api_call) @curation_set_name = curation_set_name @api_call = api_call @items = CurationSetItems.new(@curation_set_name, @api_call) end |
Instance Attribute Details
#items ⇒ Object (readonly)
Returns the value of attribute items.
5 6 7 |
# File 'lib/typesense/curation_set.rb', line 5 def items @items end |
Instance Method Details
#delete ⇒ Object
21 22 23 |
# File 'lib/typesense/curation_set.rb', line 21 def delete @api_call.delete(endpoint_path) end |
#retrieve ⇒ Object
17 18 19 |
# File 'lib/typesense/curation_set.rb', line 17 def retrieve @api_call.get(endpoint_path) end |
#upsert(curation_set_data) ⇒ Object
13 14 15 |
# File 'lib/typesense/curation_set.rb', line 13 def upsert(curation_set_data) @api_call.put(endpoint_path, curation_set_data) end |