Module: Swiftype::Client::DocumentType
- Included in:
- Swiftype::Client
- Defined in:
- lib/swiftype/client.rb
Overview
Every Document must belong to a DocumentType. For more information, see the REST API overview.
Instance Method Summary collapse
- #create_document_type(engine_id, name) ⇒ Object
- #destroy_document_type(engine_id, document_type_id) ⇒ Object
- #document_type(engine_id, document_type_id) ⇒ Object
- #document_types(engine_id) ⇒ Object
Instance Method Details
#create_document_type(engine_id, name) ⇒ Object
271 272 273 |
# File 'lib/swiftype/client.rb', line 271 def create_document_type(engine_id, name) post("engines/#{engine_id}/document_types.json", :document_type => {:name => name}) end |
#destroy_document_type(engine_id, document_type_id) ⇒ Object
275 276 277 |
# File 'lib/swiftype/client.rb', line 275 def destroy_document_type(engine_id, document_type_id) delete("engines/#{engine_id}/document_types/#{document_type_id}.json") end |
#document_type(engine_id, document_type_id) ⇒ Object
267 268 269 |
# File 'lib/swiftype/client.rb', line 267 def document_type(engine_id, document_type_id) get("engines/#{engine_id}/document_types/#{document_type_id}.json") end |
#document_types(engine_id) ⇒ Object
263 264 265 |
# File 'lib/swiftype/client.rb', line 263 def document_types(engine_id) get("engines/#{engine_id}/document_types.json") end |