Module: Panoptes::Client::Subjects
- Included in:
- Panoptes::Client
- Defined in:
- lib/panoptes/client/subjects.rb
Instance Method Summary collapse
-
#retire_subject(workflow_id, subject_id, reason: nil) ⇒ Object
Retire a subject for a workflow.
-
#subjects(subject_set_id:) ⇒ Object
Get list of subjects.
Instance Method Details
#retire_subject(workflow_id, subject_id, reason: nil) ⇒ Object
TODO:
Add this endpoint to the Apiary docs and add a see-reference here.
Retire a subject for a workflow
22 23 24 25 26 27 28 29 |
# File 'lib/panoptes/client/subjects.rb', line 22 def retire_subject(workflow_id, subject_id, reason: nil) panoptes.post("/workflows/#{workflow_id}/retired_subjects", { admin: true, subject_id: subject_id, retirement_reason: reason }) true end |
#subjects(subject_set_id:) ⇒ Object
Get list of subjects
8 9 10 11 12 13 14 |
# File 'lib/panoptes/client/subjects.rb', line 8 def subjects(subject_set_id:) query = {} query[:subject_set_id] = subject_set_id response = panoptes.get("/subjects", query) response.fetch("subjects") end |