Module: PyBossa::TaskRun
- Defined in:
- lib/pybossa-api/task_run.rb
Class Method Summary collapse
-
.create(opts = {}) ⇒ Hash
Creates a task run.
-
.delete(id, opts = {}) ⇒ Object
Deletes a task run.
-
.get(id, opts = {}) ⇒ Hash
A task run.
-
.list(opts = {}) ⇒ Array
A list of task runs.
-
.update(id, opts = {}) ⇒ Object
Updates a task run.
Class Method Details
.create(opts = {}) ⇒ Hash
Creates a task run.
33 34 35 36 37 38 |
# File 'lib/pybossa-api/task_run.rb', line 33 def create(opts = {}) if opts.has_key? :calibration opts[:calibration] = opts[:calibration] ? 1 : 0 end PyBossa::API.create 'taskrun', opts end |
.delete(id, opts = {}) ⇒ Object
Deletes a task run.
57 58 59 |
# File 'lib/pybossa-api/task_run.rb', line 57 def delete(id, opts = {}) PyBossa::API.destroy 'taskrun', id, opts end |
.get(id, opts = {}) ⇒ Hash
Returns a task run.
16 17 18 |
# File 'lib/pybossa-api/task_run.rb', line 16 def get(id, opts = {}) PyBossa::API.retrieve 'taskrun', id, opts end |