asana 0.9.2 → 0.10.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (91) hide show
  1. checksums.yaml +4 -4
  2. data/.swagger-codegen-ignore +3 -0
  3. data/.travis.yml +2 -1
  4. data/Appraisals +2 -35
  5. data/Gemfile +2 -0
  6. data/README.md +3 -51
  7. data/VERSION +1 -0
  8. data/asana.gemspec +3 -3
  9. data/examples/Gemfile.lock +10 -10
  10. data/lib/asana/client.rb +10 -10
  11. data/lib/asana/http_client.rb +8 -2
  12. data/lib/asana/resource_includes/attachment_uploading.rb +14 -7
  13. data/lib/asana/resource_includes/collection.rb +5 -0
  14. data/lib/asana/resource_includes/resource.rb +0 -4
  15. data/lib/asana/resources/attachment.rb +2 -5
  16. data/lib/asana/resources/batch_api.rb +15 -0
  17. data/lib/asana/resources/custom_field_settings.rb +2 -5
  18. data/lib/asana/resources/custom_fields.rb +2 -5
  19. data/lib/asana/resources/events.rb +28 -0
  20. data/lib/asana/resources/gen/attachments_base.rb +56 -0
  21. data/lib/asana/resources/gen/batch_api_base.rb +30 -0
  22. data/lib/asana/resources/gen/custom_field_settings_base.rb +46 -0
  23. data/lib/asana/resources/gen/custom_fields_base.rb +124 -0
  24. data/lib/asana/resources/gen/events_base.rb +32 -0
  25. data/lib/asana/resources/gen/jobs_base.rb +30 -0
  26. data/lib/asana/resources/gen/organization_exports_base.rb +44 -0
  27. data/lib/asana/resources/gen/portfolio_memberships_base.rb +63 -0
  28. data/lib/asana/resources/gen/portfolios_base.rb +173 -0
  29. data/lib/asana/resources/gen/project_memberships_base.rb +46 -0
  30. data/lib/asana/resources/gen/project_statuses_base.rb +69 -0
  31. data/lib/asana/resources/gen/projects_base.rb +259 -0
  32. data/lib/asana/resources/gen/sections_base.rb +108 -0
  33. data/lib/asana/resources/gen/stories_base.rb +84 -0
  34. data/lib/asana/resources/gen/tags_base.rb +129 -0
  35. data/lib/asana/resources/gen/tasks_base.rb +425 -0
  36. data/lib/asana/resources/gen/team_memberships_base.rb +77 -0
  37. data/lib/asana/resources/gen/teams_base.rb +88 -0
  38. data/lib/asana/resources/gen/typeahead_base.rb +35 -0
  39. data/lib/asana/resources/gen/user_task_lists_base.rb +44 -0
  40. data/lib/asana/resources/gen/users_base.rb +88 -0
  41. data/lib/asana/resources/gen/webhooks_base.rb +70 -0
  42. data/lib/asana/resources/gen/workspace_memberships_base.rb +60 -0
  43. data/lib/asana/resources/gen/workspaces_base.rb +82 -0
  44. data/lib/asana/resources/job.rb +2 -3
  45. data/lib/asana/resources/organization_export.rb +2 -5
  46. data/lib/asana/resources/portfolio.rb +2 -5
  47. data/lib/asana/resources/portfolio_membership.rb +2 -5
  48. data/lib/asana/resources/project.rb +2 -5
  49. data/lib/asana/resources/project_membership.rb +2 -5
  50. data/lib/asana/resources/project_status.rb +2 -5
  51. data/lib/asana/resources/section.rb +18 -22
  52. data/lib/asana/resources/story.rb +2 -5
  53. data/lib/asana/resources/tag.rb +2 -5
  54. data/lib/asana/resources/task.rb +5 -5
  55. data/lib/asana/resources/team.rb +2 -5
  56. data/lib/asana/resources/team_membership.rb +26 -0
  57. data/lib/asana/resources/typeahead.rb +22 -0
  58. data/lib/asana/resources/user.rb +2 -5
  59. data/lib/asana/resources/user_task_list.rb +2 -5
  60. data/lib/asana/resources/webhook.rb +2 -5
  61. data/lib/asana/resources/workspace.rb +2 -6
  62. data/lib/asana/resources/workspace_membership.rb +32 -0
  63. data/lib/asana/version.rb +1 -1
  64. data/samples/attachments_sample.yaml +41 -0
  65. data/samples/batch_api_sample.yaml +11 -0
  66. data/samples/custom_field_settings_sample.yaml +21 -0
  67. data/samples/custom_fields_sample.yaml +81 -0
  68. data/samples/events_sample.yaml +11 -0
  69. data/samples/jobs_sample.yaml +11 -0
  70. data/samples/organization_exports_sample.yaml +21 -0
  71. data/samples/portfolio_memberships_sample.yaml +31 -0
  72. data/samples/portfolios_sample.yaml +121 -0
  73. data/samples/project_memberships_sample.yaml +21 -0
  74. data/samples/project_statuses_sample.yaml +41 -0
  75. data/samples/projects_sample.yaml +181 -0
  76. data/samples/sections_sample.yaml +71 -0
  77. data/samples/stories_sample.yaml +51 -0
  78. data/samples/tags_sample.yaml +81 -0
  79. data/samples/tasks_sample.yaml +261 -0
  80. data/samples/team_memberships_sample.yaml +41 -0
  81. data/samples/teams_sample.yaml +51 -0
  82. data/samples/typeahead_sample.yaml +11 -0
  83. data/samples/user_task_lists_sample.yaml +21 -0
  84. data/samples/users_sample.yaml +51 -0
  85. data/samples/webhooks_sample.yaml +41 -0
  86. data/samples/workspace_memberships_sample.yaml +31 -0
  87. data/samples/workspaces_sample.yaml +51 -0
  88. data/swagger_templates/api.mustache +41 -0
  89. data/swagger_templates/api_doc.mustache +12 -0
  90. data/swagger_templates/ruby-config.json +6 -0
  91. metadata +70 -13
@@ -0,0 +1,31 @@
1
+ workspacememberships:
2
+ get_workspace_membership: >-
3
+ require 'asana'
4
+
5
+
6
+ client = Asana::Client.new do |c|
7
+ c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
8
+ end
9
+
10
+
11
+ result = client.workspace_memberships.get_workspace_membership(workspace_membership_gid: 'workspace_membership_gid', param: "value", param: "value", options: {pretty: true})
12
+ get_workspace_memberships_for_user: >-
13
+ require 'asana'
14
+
15
+
16
+ client = Asana::Client.new do |c|
17
+ c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
18
+ end
19
+
20
+
21
+ result = client.workspace_memberships.get_workspace_memberships_for_user(user_gid: 'user_gid', param: "value", param: "value", options: {pretty: true})
22
+ get_workspace_memberships_for_workspace: >-
23
+ require 'asana'
24
+
25
+
26
+ client = Asana::Client.new do |c|
27
+ c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
28
+ end
29
+
30
+
31
+ result = client.workspace_memberships.get_workspace_memberships_for_workspace(workspace_gid: 'workspace_gid', param: "value", param: "value", options: {pretty: true})
@@ -0,0 +1,51 @@
1
+ workspaces:
2
+ add_user_for_workspace: >-
3
+ require 'asana'
4
+
5
+
6
+ client = Asana::Client.new do |c|
7
+ c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
8
+ end
9
+
10
+
11
+ result = client.workspaces.add_user_for_workspace(workspace_gid: 'workspace_gid', field: "value", field: "value", options: {pretty: true})
12
+ get_workspace: >-
13
+ require 'asana'
14
+
15
+
16
+ client = Asana::Client.new do |c|
17
+ c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
18
+ end
19
+
20
+
21
+ result = client.workspaces.get_workspace(workspace_gid: 'workspace_gid', param: "value", param: "value", options: {pretty: true})
22
+ get_workspaces: >-
23
+ require 'asana'
24
+
25
+
26
+ client = Asana::Client.new do |c|
27
+ c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
28
+ end
29
+
30
+
31
+ result = client.workspaces.get_workspaces(param: "value", param: "value", options: {pretty: true})
32
+ remove_user_for_workspace: >-
33
+ require 'asana'
34
+
35
+
36
+ client = Asana::Client.new do |c|
37
+ c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
38
+ end
39
+
40
+
41
+ result = client.workspaces.remove_user_for_workspace(workspace_gid: 'workspace_gid', field: "value", field: "value", options: {pretty: true})
42
+ update_workspace: >-
43
+ require 'asana'
44
+
45
+
46
+ client = Asana::Client.new do |c|
47
+ c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
48
+ end
49
+
50
+
51
+ result = client.workspaces.update_workspace(workspace_gid: 'workspace_gid', field: "value", field: "value", options: {pretty: true})
@@ -0,0 +1,41 @@
1
+ ### WARNING: This file is auto-generated by our OpenAPI spec. Do not
2
+ ### edit it manually.
3
+
4
+ require_relative '../../resource_includes/response_helper'
5
+
6
+ {{#operations}}
7
+ module Asana
8
+ module Resources
9
+ class {{classname}}Base < Resource
10
+
11
+ def self.inherited(base)
12
+ Registry.register(base)
13
+ end
14
+
15
+ class << self
16
+ {{#operation}}{{^formParams}}
17
+ {{#contents}}
18
+ # {{#summary}}{{{.}}}{{/summary}}{{^summary}}{{operationId}}{{/summary}}
19
+ #
20
+ {{#pathParams}}
21
+ # {{paramName}} - [{{dataType}}] {{#required}} (required){{/required}}{{#optional}}(optional){{/optional}}{{#description}} {{{description}}}{{/description}}{{/pathParams}}{{#queryParams}}{{#neq baseName 'opt_pretty' 'opt_fields' 'offset' 'limit'}}
22
+ # {{paramName}} - [{{~dataType~}}] {{#required}} (required){{/required}}{{#optional}}(optional){{/optional}}{{#description}} {{{description}}}{{/description}}{{/neq}}{{/queryParams}}
23
+ # options - [Hash] the request I/O options{{#queryParams}}{{#eq baseName 'opt_pretty' 'opt_fields' 'offset' 'limit'}}
24
+ # > {{paramName}} - [{{~dataType~}}] {{#required}} (required){{/required}}{{#optional}}(optional){{/optional}}{{#description}} {{{description}}}{{/description}}{{/eq}}{{/queryParams}}
25
+ {{#eq httpMethod 'POST' 'PUT'}}
26
+ # data - [Hash] the attributes to {{httpMethod}}
27
+ {{/eq}}
28
+ def {{operationId}}(client, {{#pathParams}}{{paramName}}: required("{{paramName}}"), {{/pathParams}}{{#queryParams}}{{#neq baseName 'opt_pretty' 'opt_fields' 'offset' 'limit'}}{{paramName}}: nil, {{/neq}}{{/queryParams}}options: {}{{#eq httpMethod 'POST' 'PUT'}}, **data{{/eq}})
29
+ path = "{{path}}"{{#pathParams}}
30
+ path["{ {{~baseName~}} }"] = {{paramName}}{{/pathParams}}{{^moreThanCommon queryParams}}
31
+ params = { {{#queryParams}}{{#neq baseName 'opt_pretty' 'opt_fields' 'offset' 'limit'}}{{#unless @first}}, {{/unless}}{{#neq paramName (fixSearchParams paramName)}}"{{/neq}}{{fixSearchParams paramName}}{{#neq paramName (fixSearchParams paramName)}}"{{/neq}}: {{paramName}}{{/neq}}{{/queryParams}} }.reject { |_,v| v.nil? || Array(v).empty? }{{/moreThanCommon}}
32
+ {{#returnContainer}}Collection.new({{/returnContainer}}{{^returnContainer}}{{#firstClassResponseObject returnType}}{{firstClassResponseObject returnType}}.new({{/firstClassResponseObject}}{{/returnContainer}}parse(client.{{toLowerCase httpMethod}}(path, {{^moreThanCommon queryParams}}params: params, {{/moreThanCommon}}{{#eq httpMethod 'POST' 'PUT'}}body: data, {{/eq}}{{#queryParams.length}}params: params, {{/queryParams.length}}options: options)){{^returnContainer}}.first{{/returnContainer}}{{#returnContainer}}, type: {{#if (firstClassResponseObject returnType)}}{{firstClassResponseObject returnType}}{{else}}Resource{{/if}}{{/returnContainer}}{{#returnContainer}}, client: client){{/returnContainer}}{{^returnContainer}}{{#firstClassResponseObject returnType}}, client: client){{/firstClassResponseObject}}{{/returnContainer}}
33
+ end
34
+
35
+ {{/contents}}
36
+ {{/formParams}}{{/operation}}
37
+ end
38
+ end
39
+ end
40
+ end
41
+ {{/operations}}
@@ -0,0 +1,12 @@
1
+ {{#operations}}{{toLowerCase classname}}: {{#operation}}{{#contents}}
2
+ {{operationId}}: >-
3
+ require 'asana'
4
+
5
+
6
+ client = Asana::Client.new do |c|
7
+ c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
8
+ end
9
+
10
+
11
+ result = client.{{toLowerCase baseName}}.{{operationId}}({{#pathParams}}{{paramName}}: '{{paramName}}', {{/pathParams}}{{#queryParams}}{{#eq required true}}{{paramName}}: '{{example}}', {{/eq}}{{/queryParams}}{{#eq httpMethod 'GET'}}param: "value", param: "value", {{/eq}}{{#eq httpMethod 'POST' 'PUT'}}field: "value", field: "value", {{/eq}}options: {pretty: true}){{/contents}}{{/operation}}
12
+ {{/operations}}
@@ -0,0 +1,6 @@
1
+ {
2
+ "packageName" : "asana",
3
+ "templateDir": "swagger_templates",
4
+ "hideGenerationTimestamp": true,
5
+ "apiTests": false
6
+ }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: asana
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.2
4
+ version: 0.10.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Txus
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-08-16 00:00:00.000000000 Z
11
+ date: 2021-01-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: oauth2
@@ -30,28 +30,28 @@ dependencies:
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '0.9'
33
+ version: '1.0'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '0.9'
40
+ version: '1.0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: faraday_middleware
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '0.9'
47
+ version: '1.0'
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: '0.9'
54
+ version: '1.0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: faraday_middleware-multi_json
57
57
  requirement: !ruby/object:Gem::Requirement
@@ -98,20 +98,20 @@ dependencies:
98
98
  name: appraisal
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
- - - "~>"
101
+ - - ">="
102
102
  - !ruby/object:Gem::Version
103
103
  version: '2.1'
104
- - - ">="
104
+ - - "~>"
105
105
  - !ruby/object:Gem::Version
106
106
  version: '2.1'
107
107
  type: :development
108
108
  prerelease: false
109
109
  version_requirements: !ruby/object:Gem::Requirement
110
110
  requirements:
111
- - - "~>"
111
+ - - ">="
112
112
  - !ruby/object:Gem::Version
113
113
  version: '2.1'
114
- - - ">="
114
+ - - "~>"
115
115
  - !ruby/object:Gem::Version
116
116
  version: '2.1'
117
117
  description: Official Ruby client for the Asana API
@@ -126,6 +126,7 @@ files:
126
126
  - ".rspec"
127
127
  - ".rubocop.yml"
128
128
  - ".ruby-version"
129
+ - ".swagger-codegen-ignore"
129
130
  - ".travis.yml"
130
131
  - ".yardopts"
131
132
  - Appraisals
@@ -135,6 +136,7 @@ files:
135
136
  - LICENSE.txt
136
137
  - README.md
137
138
  - Rakefile
139
+ - VERSION
138
140
  - asana.gemspec
139
141
  - bin/console
140
142
  - bin/setup
@@ -167,8 +169,34 @@ files:
167
169
  - lib/asana/resource_includes/response_helper.rb
168
170
  - lib/asana/resources.rb
169
171
  - lib/asana/resources/attachment.rb
172
+ - lib/asana/resources/batch_api.rb
170
173
  - lib/asana/resources/custom_field_settings.rb
171
174
  - lib/asana/resources/custom_fields.rb
175
+ - lib/asana/resources/events.rb
176
+ - lib/asana/resources/gen/attachments_base.rb
177
+ - lib/asana/resources/gen/batch_api_base.rb
178
+ - lib/asana/resources/gen/custom_field_settings_base.rb
179
+ - lib/asana/resources/gen/custom_fields_base.rb
180
+ - lib/asana/resources/gen/events_base.rb
181
+ - lib/asana/resources/gen/jobs_base.rb
182
+ - lib/asana/resources/gen/organization_exports_base.rb
183
+ - lib/asana/resources/gen/portfolio_memberships_base.rb
184
+ - lib/asana/resources/gen/portfolios_base.rb
185
+ - lib/asana/resources/gen/project_memberships_base.rb
186
+ - lib/asana/resources/gen/project_statuses_base.rb
187
+ - lib/asana/resources/gen/projects_base.rb
188
+ - lib/asana/resources/gen/sections_base.rb
189
+ - lib/asana/resources/gen/stories_base.rb
190
+ - lib/asana/resources/gen/tags_base.rb
191
+ - lib/asana/resources/gen/tasks_base.rb
192
+ - lib/asana/resources/gen/team_memberships_base.rb
193
+ - lib/asana/resources/gen/teams_base.rb
194
+ - lib/asana/resources/gen/typeahead_base.rb
195
+ - lib/asana/resources/gen/user_task_lists_base.rb
196
+ - lib/asana/resources/gen/users_base.rb
197
+ - lib/asana/resources/gen/webhooks_base.rb
198
+ - lib/asana/resources/gen/workspace_memberships_base.rb
199
+ - lib/asana/resources/gen/workspaces_base.rb
172
200
  - lib/asana/resources/job.rb
173
201
  - lib/asana/resources/organization_export.rb
174
202
  - lib/asana/resources/portfolio.rb
@@ -181,15 +209,45 @@ files:
181
209
  - lib/asana/resources/tag.rb
182
210
  - lib/asana/resources/task.rb
183
211
  - lib/asana/resources/team.rb
212
+ - lib/asana/resources/team_membership.rb
213
+ - lib/asana/resources/typeahead.rb
184
214
  - lib/asana/resources/user.rb
185
215
  - lib/asana/resources/user_task_list.rb
186
216
  - lib/asana/resources/webhook.rb
187
217
  - lib/asana/resources/workspace.rb
218
+ - lib/asana/resources/workspace_membership.rb
188
219
  - lib/asana/ruby2_0_0_compatibility.rb
189
220
  - lib/asana/version.rb
190
221
  - lib/templates/index.js
191
222
  - lib/templates/resource.ejs
192
223
  - package.json
224
+ - samples/attachments_sample.yaml
225
+ - samples/batch_api_sample.yaml
226
+ - samples/custom_field_settings_sample.yaml
227
+ - samples/custom_fields_sample.yaml
228
+ - samples/events_sample.yaml
229
+ - samples/jobs_sample.yaml
230
+ - samples/organization_exports_sample.yaml
231
+ - samples/portfolio_memberships_sample.yaml
232
+ - samples/portfolios_sample.yaml
233
+ - samples/project_memberships_sample.yaml
234
+ - samples/project_statuses_sample.yaml
235
+ - samples/projects_sample.yaml
236
+ - samples/sections_sample.yaml
237
+ - samples/stories_sample.yaml
238
+ - samples/tags_sample.yaml
239
+ - samples/tasks_sample.yaml
240
+ - samples/team_memberships_sample.yaml
241
+ - samples/teams_sample.yaml
242
+ - samples/typeahead_sample.yaml
243
+ - samples/user_task_lists_sample.yaml
244
+ - samples/users_sample.yaml
245
+ - samples/webhooks_sample.yaml
246
+ - samples/workspace_memberships_sample.yaml
247
+ - samples/workspaces_sample.yaml
248
+ - swagger_templates/api.mustache
249
+ - swagger_templates/api_doc.mustache
250
+ - swagger_templates/ruby-config.json
193
251
  homepage: https://github.com/asana/ruby-asana
194
252
  licenses:
195
253
  - MIT
@@ -200,7 +258,7 @@ require_paths:
200
258
  - lib
201
259
  required_ruby_version: !ruby/object:Gem::Requirement
202
260
  requirements:
203
- - - "~>"
261
+ - - ">"
204
262
  - !ruby/object:Gem::Version
205
263
  version: '2.0'
206
264
  required_rubygems_version: !ruby/object:Gem::Requirement
@@ -209,8 +267,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
209
267
  - !ruby/object:Gem::Version
210
268
  version: '0'
211
269
  requirements: []
212
- rubyforge_project:
213
- rubygems_version: 2.7.7
270
+ rubygems_version: 3.0.8
214
271
  signing_key:
215
272
  specification_version: 4
216
273
  summary: Official Ruby client for the Asana API