Module: Panoptes::Client::Projects
- Included in:
- Panoptes::Client
- Defined in:
- lib/panoptes/client/projects.rb
Instance Method Summary collapse
-
#create_aggregations_export(project_id) ⇒ Hash
Starts a background process to generate a new CSV export of the aggretation results of the project.
-
#create_classifications_export(project_id) ⇒ Hash
Starts a background process to generate a new CSV export of all the classifications in the project.
-
#create_subjects_export(project_id) ⇒ Hash
Starts a background process to generate a new CSV export of all the subjects in the project.
-
#create_workflow_contents_export(project_id) ⇒ Hash
Starts a background process to generate a new CSV export of all the workflow_contents in the project.
-
#create_workflows_export(project_id) ⇒ Hash
Starts a background process to generate a new CSV export of all the workflows in the project.
-
#projects(search: nil) ⇒ Array
Fetches the list of all projects.
Instance Method Details
#create_aggregations_export(project_id) ⇒ Hash
Starts a background process to generate a new CSV export of the aggretation results of the project.
56 57 58 59 |
# File 'lib/panoptes/client/projects.rb', line 56 def create_aggregations_export(project_id) params = {media: {content_type: "application/x-gzip", metadata: { recipients: []}}} panoptes.post("/projects/#{project_id}/aggregations_export", params)["media"].first end |
#create_classifications_export(project_id) ⇒ Hash
Starts a background process to generate a new CSV export of all the classifications in the project.
20 21 22 23 |
# File 'lib/panoptes/client/projects.rb', line 20 def create_classifications_export(project_id) params = {media: {content_type: "text/csv", metadata: { recipients: []}}} panoptes.post("/projects/#{project_id}/classifications_export", params)["media"].first end |
#create_subjects_export(project_id) ⇒ Hash
Starts a background process to generate a new CSV export of all the subjects in the project.
29 30 31 32 |
# File 'lib/panoptes/client/projects.rb', line 29 def create_subjects_export(project_id) params = {media: {content_type: "text/csv", metadata: { recipients: []}}} panoptes.post("/projects/#{project_id}/subjects_export", params)["media"].first end |
#create_workflow_contents_export(project_id) ⇒ Hash
Starts a background process to generate a new CSV export of all the workflow_contents in the project.
47 48 49 50 |
# File 'lib/panoptes/client/projects.rb', line 47 def create_workflow_contents_export(project_id) params = {media: {content_type: "text/csv", metadata: { recipients: []}}} panoptes.post("/projects/#{project_id}/workflow_contents_export", params)["media"].first end |
#create_workflows_export(project_id) ⇒ Hash
Starts a background process to generate a new CSV export of all the workflows in the project.
38 39 40 41 |
# File 'lib/panoptes/client/projects.rb', line 38 def create_workflows_export(project_id) params = {media: {content_type: "text/csv", metadata: { recipients: []}}} panoptes.post("/projects/#{project_id}/workflows_export", params)["media"].first end |
#projects(search: nil) ⇒ Array
Fetches the list of all projects.
9 10 11 12 13 14 |
# File 'lib/panoptes/client/projects.rb', line 9 def projects(search: nil) params = {} params[:search] = search if search panoptes.paginate("/projects", params)["projects"] end |