Module: PyBossa::App
- Defined in:
- lib/pybossa-api/app.rb
Class Method Summary collapse
-
.create(opts = {}) ⇒ Hash
Creates an app.
-
.delete(id, opts = {}) ⇒ Object
Deletes an app.
-
.get(id, opts = {}) ⇒ Hash
An app.
-
.list(opts = {}) ⇒ Array
A list of apps.
-
.update(id, opts = {}) ⇒ Object
Updates an app.
Class Method Details
.create(opts = {}) ⇒ Hash
Creates an app.
38 39 40 41 42 43 |
# File 'lib/pybossa-api/app.rb', line 38 def create(opts = {}) if opts.has_key? :hidden opts[:hidden] = opts[:hidden] ? 1 : 0 end PyBossa::API.create 'app', opts end |
.delete(id, opts = {}) ⇒ Object
Deletes an app.
62 63 64 |
# File 'lib/pybossa-api/app.rb', line 62 def delete(id, opts = {}) PyBossa::API.destroy 'app', id, opts end |
.get(id, opts = {}) ⇒ Hash
Returns an app.
16 17 18 |
# File 'lib/pybossa-api/app.rb', line 16 def get(id, opts = {}) PyBossa::API.retrieve 'app', id, opts end |