Class: Transloadit::Template
- Defined in:
- lib/transloadit/template.rb
Overview
Represents a Template API ready to interact with its corresponding REST API.
See the Transloadit documentation for further information on Templates and their parameters.
Instance Attribute Summary
Attributes inherited from ApiModel
Instance Method Summary collapse
-
#create(params) ⇒ Object
Submits a template to be created.
-
#delete(id, params = {}) ⇒ Object
Deletes the template object specified by the template id.
-
#get(id, params = {}) ⇒ Object
Returns a single template object specified by the template id.
-
#list(params = {}) ⇒ Object
Returns a list of all templates.
-
#update(id, params = {}) ⇒ Object
Updates the template object specified by the template id.
Methods inherited from ApiModel
#initialize, #inspect, #to_hash, #to_json
Constructor Details
This class inherits a constructor from Transloadit::ApiModel
Instance Method Details
#create(params) ⇒ Object
Submits a template to be created.
20 21 22 |
# File 'lib/transloadit/template.rb', line 20 def create(params) _do_request("/templates", params, "post") end |
#delete(id, params = {}) ⇒ Object
Deletes the template object specified by the template id
60 61 62 |
# File 'lib/transloadit/template.rb', line 60 def delete(id, params = {}) _do_request("/templates/#{id}", params, "delete") end |
#get(id, params = {}) ⇒ Object
Returns a single template object specified by the template id
37 38 39 |
# File 'lib/transloadit/template.rb', line 37 def get(id, params = {}) _do_request("/templates/#{id}", params) end |
#list(params = {}) ⇒ Object
Returns a list of all templates
28 29 30 |
# File 'lib/transloadit/template.rb', line 28 def list(params = {}) _do_request("/templates", params) end |
#update(id, params = {}) ⇒ Object
Updates the template object specified by the template id
51 52 53 |
# File 'lib/transloadit/template.rb', line 51 def update(id, params = {}) _do_request("/templates/#{id}", params, "put") end |