lib/panoptes/client/subjects.rb in panoptes-client-0.2.5 vs lib/panoptes/client/subjects.rb in panoptes-client-0.2.6

- old
+ new

@@ -1,7 +1,19 @@ module Panoptes class Client module Subjects + # Get list of subjects + # + # @param subject_set_id [Integer] filter by subject set + # @return list of subjects + def subjects(subject_set_id:) + query = {} + query[:subject_set_id] = subject_set_id + + response = get("/subjects", query) + response.fetch("subjects") + end + # Retire a subject for a workflow # # @todo Add this endpoint to the Apiary docs and add a see-reference here. # @param workflow_id [Integer] the ID of a workflow # @param subject_id [Integer] the ID of a subject associated with that workflow (through one of the assigned subject_sets)