panoptes-client 0.3.6 → 0.3.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 89ee396e9d5d582ce684a5c1d32f3341b6757e35
4
- data.tar.gz: 5420c9d981e2e119d645943878d8c856f384d06f
3
+ metadata.gz: 6dfa5396972aa397744d3069b4f9c5712519aa6e
4
+ data.tar.gz: 3f6376476e116a7504464a0b8178f0a9b1af4c2c
5
5
  SHA512:
6
- metadata.gz: 1600fba32b1c616153c58dc661c762abf98bba509bd0773117e6d7fe579050d97f5cd9b5cf56cd23d1514ea795f135a49d7583aa7da15063a889d0f2c0f5164b
7
- data.tar.gz: 20027bd022aa23c56ad328f2f0a51ca5f1781318e21a8945d741e5f83e13584b17cbcd6fe0f5d163fbf8babc0dbecf0ecb6e3238c668677ad4dcae1d8dddbe11
6
+ metadata.gz: 2391ac867ebfb4a09738e0724f1b2cfdffcd5ec56bf6b9b08031cbac63e91d9a33ca8fca73b75ad6318d2c4919796203d1f4440a5576992c41c4365fdc7f1df6
7
+ data.tar.gz: 5ce9d31ccd06ea81fc169e876cadbce70c53f957f81ea2b04fce48745ead872560b9dc6ec35177e21d72f9ed5a02aaf9985d869187369f10e00dce19237f04ff
@@ -1,3 +1,7 @@
1
+ # 0.3.7
2
+
3
+ * Add client.project(project_id)
4
+
1
5
  # 0.3.4
2
6
 
3
7
  * Add `client.add_subject_set_to_workflow`
@@ -13,6 +13,16 @@ module Panoptes
13
13
  panoptes.paginate("/projects", params)["projects"]
14
14
  end
15
15
 
16
+ # Fetches the specified project
17
+ #
18
+ # @see http://docs.panoptes.apiary.io/#reference/projects/project-collection/list-all-projects
19
+ # @param project_id [String] The ID of the project to be retrieved
20
+ # @return [Hash] The requested project
21
+ def project(project_id)
22
+ response = panoptes.get("/projects/#{project_id}")
23
+ response.fetch("projects").find {|i| i.fetch("id").to_s == project_id.to_s }
24
+ end
25
+
16
26
  # Starts a background process to generate a new CSV export of all the classifications in the project.
17
27
  #
18
28
  # @param project_id [Integer] the id of the project to export
@@ -1,5 +1,5 @@
1
1
  module Panoptes
2
2
  class Client
3
- VERSION = "0.3.6".freeze
3
+ VERSION = "0.3.7".freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: panoptes-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.6
4
+ version: 0.3.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marten Veldthuis
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: exe
12
12
  cert_chain: []
13
- date: 2018-02-01 00:00:00.000000000 Z
13
+ date: 2018-06-07 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: faraday