panoptes-client 0.2.2 → 0.2.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1018268bfcfe069a1d041e58bd81a01ac49b0e48
4
- data.tar.gz: 7353ed216c2c7207b8abeb4b6b7c2d0e1f7604f6
3
+ metadata.gz: 6223043ae6d605ad20d4a9c7580d9eadf7039bd2
4
+ data.tar.gz: 5a59a8f96eebeaadf037d901edd1932eed263b72
5
5
  SHA512:
6
- metadata.gz: 22777c5680c58d4f0ccd351bbddc9c78024b82a34217605ea4641ba51a54f925c097d9bc467ebc90a89d182c4bcf39e17c1f69dd2b324d7389206433e9568a5c
7
- data.tar.gz: e0b0e7c779471b6b6cb28056b9fc7f5108fc7add67f43fb5a1897f27deea802db5070486d777fba25eb6ae0ba8baabeb8541a20cbcbbc6fc817cf4b645723bc7
6
+ metadata.gz: 9bdbb9f52758526d90125265e9b71dc344c56c85eacd2441a22838564221a1d991266ece4ef77df0d48da7f9e3ddf2d760d4aef4f4c1c063603590cad8d5da68
7
+ data.tar.gz: eee4e0eec28cffc2937c392b71f7f4ab07e8df858396169491cf934b9a82e7e7cb9fdd4e3eb66416784cb99838fba4fd96fc82d62189dc8ae67d746e3cc7e79d
data/CHANGELOG.md CHANGED
@@ -1,3 +1,11 @@
1
+ # 0.2.3
2
+
3
+ * Add methods for creating project data exports
4
+
5
+ # 0.2.2
6
+
7
+ * ?
8
+
1
9
  # 0.2.1
2
10
 
3
11
  * Fix bug with token authentication
@@ -12,6 +12,51 @@ module Panoptes
12
12
 
13
13
  paginate("/projects", params)["projects"]
14
14
  end
15
+
16
+ # Starts a background process to generate a new CSV export of all the classifications in the project.
17
+ #
18
+ # @param project_id [Integer] the id of the project to export
19
+ # @return [Hash] the medium information where the export will be stored when it's generated
20
+ def create_classifications_export(project_id)
21
+ params = {media: {content_type: "text/csv", metadata: { recipients: []}}}
22
+ post("/projects/#{project_id}/classifications_export", params)["media"].first
23
+ end
24
+
25
+ # Starts a background process to generate a new CSV export of all the subjects in the project.
26
+ #
27
+ # @param project_id [Integer] the id of the project to export
28
+ # @return [Hash] the medium information where the export will be stored when it's generated
29
+ def create_subjects_export(project_id)
30
+ params = {media: {content_type: "text/csv", metadata: { recipients: []}}}
31
+ post("/projects/#{project_id}/subjects_export", params)["media"].first
32
+ end
33
+
34
+ # Starts a background process to generate a new CSV export of all the workflows in the project.
35
+ #
36
+ # @param project_id [Integer] the id of the project to export
37
+ # @return [Hash] the medium information where the export will be stored when it's generated
38
+ def create_workflows_export(project_id)
39
+ params = {media: {content_type: "text/csv", metadata: { recipients: []}}}
40
+ post("/projects/#{project_id}/workflows_export", params)["media"].first
41
+ end
42
+
43
+ # Starts a background process to generate a new CSV export of all the workflow_contents in the project.
44
+ #
45
+ # @param project_id [Integer] the id of the project to export
46
+ # @return [Hash] the medium information where the export will be stored when it's generated
47
+ def create_workflow_contents_export(project_id)
48
+ params = {media: {content_type: "text/csv", metadata: { recipients: []}}}
49
+ post("/projects/#{project_id}/workflow_contents_export", params)["media"].first
50
+ end
51
+
52
+ # Starts a background process to generate a new CSV export of the aggretation results of the project.
53
+ #
54
+ # @param project_id [Integer] the id of the project to export
55
+ # @return [Hash] the medium information where the export will be stored when it's generated
56
+ def create_aggregations_export(project_id)
57
+ params = {media: {content_type: "application/x-gzip", metadata: { recipients: []}}}
58
+ post("/projects/#{project_id}/aggregations_export", params)["media"].first
59
+ end
15
60
  end
16
61
  end
17
62
  end
@@ -1,5 +1,5 @@
1
1
  module Panoptes
2
2
  class Client
3
- VERSION = "0.2.2"
3
+ VERSION = "0.2.3"
4
4
  end
5
5
  end
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.2.2
4
+ version: 0.2.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: 2016-02-29 00:00:00.000000000 Z
11
+ date: 2016-03-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday