panoptes-client 0.3.2 → 0.3.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -0
- data/lib/panoptes/client/classifications.rb +2 -2
- data/lib/panoptes/client/subjects.rb +6 -3
- data/lib/panoptes/client/version.rb +1 -1
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: abd5f8f842e58644904e3f1f6eea7d30b3bfeeb5
|
4
|
+
data.tar.gz: 1b5c1fbf52c95544b4e99f1c28dcf4400eb74ec3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0fa1849d30dde85e6ab1bb231b16ecf5b2ebd20c0b1e168a49581370aa66486d60c77421e7df518d0f751d9e343700fcfe584ff52c024e9c07b70dbd995d2d30
|
7
|
+
data.tar.gz: 5084426a472808ea540b0e7ae04700de3b3ae95ed05800edf00a4434c9c4667378597a3fa851502280cd36bef3641ca7babfd5f1c07d310272e2b8eaee91b11b
|
data/CHANGELOG.md
CHANGED
@@ -2,11 +2,11 @@ module Panoptes
|
|
2
2
|
class Client
|
3
3
|
module Classifications
|
4
4
|
def get_subject_classifications(subject_id, workflow_id)
|
5
|
-
panoptes.
|
5
|
+
panoptes.paginate("/classifications/project", {
|
6
6
|
admin: true,
|
7
7
|
workflow_id: workflow_id,
|
8
8
|
subject_id: subject_id
|
9
|
-
})
|
9
|
+
}, resource: "classifications")
|
10
10
|
end
|
11
11
|
end
|
12
12
|
end
|
@@ -5,11 +5,14 @@ module Panoptes
|
|
5
5
|
#
|
6
6
|
# @param subject_set_id [Integer] filter by subject set
|
7
7
|
# @return list of subjects
|
8
|
-
def subjects(subject_set_id:)
|
8
|
+
def subjects(subject_set_id: nil, workflow_id: nil)
|
9
9
|
query = {}
|
10
|
-
query[:subject_set_id] = subject_set_id
|
10
|
+
query[:subject_set_id] = subject_set_id if subject_set_id
|
11
|
+
query[:workflow_id] = workflow_id if workflow_id
|
11
12
|
|
12
|
-
|
13
|
+
raise 'Must filter on at least one of subject_set_id, workflow_id' if query.empty?
|
14
|
+
|
15
|
+
response = panoptes.paginate("/subjects", query)
|
13
16
|
response.fetch("subjects")
|
14
17
|
end
|
15
18
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: panoptes-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Marten Veldthuis
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-11-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -184,9 +184,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
184
184
|
version: '0'
|
185
185
|
requirements: []
|
186
186
|
rubyforge_project:
|
187
|
-
rubygems_version: 2.6.
|
187
|
+
rubygems_version: 2.6.11
|
188
188
|
signing_key:
|
189
189
|
specification_version: 4
|
190
190
|
summary: API wrapper for https://panoptes.zooniverse.org
|
191
191
|
test_files: []
|
192
|
-
has_rdoc:
|