asana 0.9.3 → 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 +2 -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,259 @@
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
+ module Asana
7
+ module Resources
8
+ class ProjectsBase < Resource
9
+
10
+ def self.inherited(base)
11
+ Registry.register(base)
12
+ end
13
+
14
+ class << self
15
+ # Add a custom field to a project
16
+ #
17
+ # project_gid - [str] (required) Globally unique identifier for the project.
18
+ # options - [Hash] the request I/O options
19
+ # > opt_pretty - [bool] Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
20
+ # data - [Hash] the attributes to POST
21
+ def add_custom_field_setting_for_project(client, project_gid: required("project_gid"), options: {}, **data)
22
+ path = "/projects/{project_gid}/addCustomFieldSetting"
23
+ path["{project_gid}"] = project_gid
24
+ CustomFieldSetting.new(parse(client.post(path, body: data, options: options)).first, client: client)
25
+ end
26
+
27
+ # Add followers to a project
28
+ #
29
+ # project_gid - [str] (required) Globally unique identifier for the project.
30
+ # options - [Hash] the request I/O options
31
+ # > opt_fields - [list[str]] Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
32
+ # > opt_pretty - [bool] Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
33
+ # data - [Hash] the attributes to POST
34
+ def add_followers_for_project(client, project_gid: required("project_gid"), options: {}, **data)
35
+ path = "/projects/{project_gid}/addFollowers"
36
+ path["{project_gid}"] = project_gid
37
+ parse(client.post(path, body: data, options: options)).first
38
+ end
39
+
40
+ # Add users to a project
41
+ #
42
+ # project_gid - [str] (required) Globally unique identifier for the project.
43
+ # options - [Hash] the request I/O options
44
+ # > opt_fields - [list[str]] Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
45
+ # > opt_pretty - [bool] Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
46
+ # data - [Hash] the attributes to POST
47
+ def add_members_for_project(client, project_gid: required("project_gid"), options: {}, **data)
48
+ path = "/projects/{project_gid}/addMembers"
49
+ path["{project_gid}"] = project_gid
50
+ parse(client.post(path, body: data, options: options)).first
51
+ end
52
+
53
+ # Create a project
54
+ #
55
+
56
+ # options - [Hash] the request I/O options
57
+ # > opt_fields - [list[str]] Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
58
+ # > opt_pretty - [bool] Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
59
+ # data - [Hash] the attributes to POST
60
+ def create_project(client, options: {}, **data)
61
+ path = "/projects"
62
+ Project.new(parse(client.post(path, body: data, options: options)).first, client: client)
63
+ end
64
+
65
+ # Create a project in a team
66
+ #
67
+ # team_gid - [str] (required) Globally unique identifier for the team.
68
+ # options - [Hash] the request I/O options
69
+ # > opt_fields - [list[str]] Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
70
+ # > opt_pretty - [bool] Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
71
+ # data - [Hash] the attributes to POST
72
+ def create_project_for_team(client, team_gid: required("team_gid"), options: {}, **data)
73
+ path = "/teams/{team_gid}/projects"
74
+ path["{team_gid}"] = team_gid
75
+ Project.new(parse(client.post(path, body: data, options: options)).first, client: client)
76
+ end
77
+
78
+ # Create a project in a workspace
79
+ #
80
+ # workspace_gid - [str] (required) Globally unique identifier for the workspace or organization.
81
+ # options - [Hash] the request I/O options
82
+ # > opt_fields - [list[str]] Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
83
+ # > opt_pretty - [bool] Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
84
+ # data - [Hash] the attributes to POST
85
+ def create_project_for_workspace(client, workspace_gid: required("workspace_gid"), options: {}, **data)
86
+ path = "/workspaces/{workspace_gid}/projects"
87
+ path["{workspace_gid}"] = workspace_gid
88
+ Project.new(parse(client.post(path, body: data, options: options)).first, client: client)
89
+ end
90
+
91
+ # Delete a project
92
+ #
93
+ # project_gid - [str] (required) Globally unique identifier for the project.
94
+ # options - [Hash] the request I/O options
95
+ # > opt_fields - [list[str]] Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
96
+ # > opt_pretty - [bool] Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
97
+ def delete_project(client, project_gid: required("project_gid"), options: {})
98
+ path = "/projects/{project_gid}"
99
+ path["{project_gid}"] = project_gid
100
+ parse(client.delete(path, options: options)).first
101
+ end
102
+
103
+ # Duplicate a project
104
+ #
105
+ # project_gid - [str] (required) Globally unique identifier for the project.
106
+ # options - [Hash] the request I/O options
107
+ # > opt_fields - [list[str]] Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
108
+ # > opt_pretty - [bool] Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
109
+ # data - [Hash] the attributes to POST
110
+ def duplicate_project(client, project_gid: required("project_gid"), options: {}, **data)
111
+ path = "/projects/{project_gid}/duplicate"
112
+ path["{project_gid}"] = project_gid
113
+ Job.new(parse(client.post(path, body: data, options: options)).first, client: client)
114
+ end
115
+
116
+ # Get a project
117
+ #
118
+ # project_gid - [str] (required) Globally unique identifier for the project.
119
+ # options - [Hash] the request I/O options
120
+ # > opt_fields - [list[str]] Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
121
+ # > opt_pretty - [bool] Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
122
+ def get_project(client, project_gid: required("project_gid"), options: {})
123
+ path = "/projects/{project_gid}"
124
+ path["{project_gid}"] = project_gid
125
+ Project.new(parse(client.get(path, options: options)).first, client: client)
126
+ end
127
+
128
+ # Get multiple projects
129
+ #
130
+
131
+ # workspace - [str] The workspace or organization to filter projects on.
132
+ # team - [str] The team to filter projects on.
133
+ # archived - [bool] Only return projects whose `archived` field takes on the value of this parameter.
134
+ # options - [Hash] the request I/O options
135
+ # > offset - [str] Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. 'Note: You can only pass in an offset that was returned to you via a previously paginated request.'
136
+ # > limit - [int] Results per page. The number of objects to return per page. The value must be between 1 and 100.
137
+ # > opt_fields - [list[str]] Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
138
+ # > opt_pretty - [bool] Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
139
+ def get_projects(client, workspace: nil, team: nil, archived: nil, options: {})
140
+ path = "/projects"
141
+ params = { workspace: workspace, team: team, archived: archived }.reject { |_,v| v.nil? || Array(v).empty? }
142
+ Collection.new(parse(client.get(path, params: params, options: options)), type: Project, client: client)
143
+ end
144
+
145
+ # Get projects a task is in
146
+ #
147
+ # task_gid - [str] (required) The task to operate on.
148
+ # options - [Hash] the request I/O options
149
+ # > offset - [str] Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. 'Note: You can only pass in an offset that was returned to you via a previously paginated request.'
150
+ # > limit - [int] Results per page. The number of objects to return per page. The value must be between 1 and 100.
151
+ # > opt_fields - [list[str]] Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
152
+ # > opt_pretty - [bool] Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
153
+ def get_projects_for_task(client, task_gid: required("task_gid"), options: {})
154
+ path = "/tasks/{task_gid}/projects"
155
+ path["{task_gid}"] = task_gid
156
+ Collection.new(parse(client.get(path, options: options)), type: Project, client: client)
157
+ end
158
+
159
+ # Get a team's projects
160
+ #
161
+ # team_gid - [str] (required) Globally unique identifier for the team.
162
+ # archived - [bool] Only return projects whose `archived` field takes on the value of this parameter.
163
+ # options - [Hash] the request I/O options
164
+ # > offset - [str] Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. 'Note: You can only pass in an offset that was returned to you via a previously paginated request.'
165
+ # > limit - [int] Results per page. The number of objects to return per page. The value must be between 1 and 100.
166
+ # > opt_fields - [list[str]] Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
167
+ # > opt_pretty - [bool] Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
168
+ def get_projects_for_team(client, team_gid: required("team_gid"), archived: nil, options: {})
169
+ path = "/teams/{team_gid}/projects"
170
+ path["{team_gid}"] = team_gid
171
+ params = { archived: archived }.reject { |_,v| v.nil? || Array(v).empty? }
172
+ Collection.new(parse(client.get(path, params: params, options: options)), type: Project, client: client)
173
+ end
174
+
175
+ # Get all projects in a workspace
176
+ #
177
+ # workspace_gid - [str] (required) Globally unique identifier for the workspace or organization.
178
+ # archived - [bool] Only return projects whose `archived` field takes on the value of this parameter.
179
+ # options - [Hash] the request I/O options
180
+ # > offset - [str] Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. 'Note: You can only pass in an offset that was returned to you via a previously paginated request.'
181
+ # > limit - [int] Results per page. The number of objects to return per page. The value must be between 1 and 100.
182
+ # > opt_fields - [list[str]] Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
183
+ # > opt_pretty - [bool] Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
184
+ def get_projects_for_workspace(client, workspace_gid: required("workspace_gid"), archived: nil, options: {})
185
+ path = "/workspaces/{workspace_gid}/projects"
186
+ path["{workspace_gid}"] = workspace_gid
187
+ params = { archived: archived }.reject { |_,v| v.nil? || Array(v).empty? }
188
+ Collection.new(parse(client.get(path, params: params, options: options)), type: Project, client: client)
189
+ end
190
+
191
+ # Get task count of a project
192
+ #
193
+ # project_gid - [str] (required) Globally unique identifier for the project.
194
+ # options - [Hash] the request I/O options
195
+ # > offset - [str] Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. 'Note: You can only pass in an offset that was returned to you via a previously paginated request.'
196
+ # > limit - [int] Results per page. The number of objects to return per page. The value must be between 1 and 100.
197
+ # > opt_fields - [list[str]] Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
198
+ # > opt_pretty - [bool] Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
199
+ def get_task_counts_for_project(client, project_gid: required("project_gid"), options: {})
200
+ path = "/projects/{project_gid}/task_counts"
201
+ path["{project_gid}"] = project_gid
202
+ parse(client.get(path, options: options)).first
203
+ end
204
+
205
+ # Remove a custom field from a project
206
+ #
207
+ # project_gid - [str] (required) Globally unique identifier for the project.
208
+ # options - [Hash] the request I/O options
209
+ # > opt_pretty - [bool] Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
210
+ # data - [Hash] the attributes to POST
211
+ def remove_custom_field_setting_for_project(client, project_gid: required("project_gid"), options: {}, **data)
212
+ path = "/projects/{project_gid}/removeCustomFieldSetting"
213
+ path["{project_gid}"] = project_gid
214
+ parse(client.post(path, body: data, options: options)).first
215
+ end
216
+
217
+ # Remove followers from a project
218
+ #
219
+ # project_gid - [str] (required) Globally unique identifier for the project.
220
+ # options - [Hash] the request I/O options
221
+ # > opt_fields - [list[str]] Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
222
+ # > opt_pretty - [bool] Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
223
+ # data - [Hash] the attributes to POST
224
+ def remove_followers_for_project(client, project_gid: required("project_gid"), options: {}, **data)
225
+ path = "/projects/{project_gid}/removeFollowers"
226
+ path["{project_gid}"] = project_gid
227
+ parse(client.post(path, body: data, options: options)).first
228
+ end
229
+
230
+ # Remove users from a project
231
+ #
232
+ # project_gid - [str] (required) Globally unique identifier for the project.
233
+ # options - [Hash] the request I/O options
234
+ # > opt_fields - [list[str]] Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
235
+ # > opt_pretty - [bool] Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
236
+ # data - [Hash] the attributes to POST
237
+ def remove_members_for_project(client, project_gid: required("project_gid"), options: {}, **data)
238
+ path = "/projects/{project_gid}/removeMembers"
239
+ path["{project_gid}"] = project_gid
240
+ parse(client.post(path, body: data, options: options)).first
241
+ end
242
+
243
+ # Update a project
244
+ #
245
+ # project_gid - [str] (required) Globally unique identifier for the project.
246
+ # options - [Hash] the request I/O options
247
+ # > opt_fields - [list[str]] Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
248
+ # > opt_pretty - [bool] Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
249
+ # data - [Hash] the attributes to PUT
250
+ def update_project(client, project_gid: required("project_gid"), options: {}, **data)
251
+ path = "/projects/{project_gid}"
252
+ path["{project_gid}"] = project_gid
253
+ Project.new(parse(client.put(path, body: data, options: options)).first, client: client)
254
+ end
255
+
256
+ end
257
+ end
258
+ end
259
+ end
@@ -0,0 +1,108 @@
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
+ module Asana
7
+ module Resources
8
+ class SectionsBase < Resource
9
+
10
+ def self.inherited(base)
11
+ Registry.register(base)
12
+ end
13
+
14
+ class << self
15
+ # Add task to section
16
+ #
17
+ # section_gid - [str] (required) The globally unique identifier for the section.
18
+ # options - [Hash] the request I/O options
19
+ # > opt_fields - [list[str]] Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
20
+ # > opt_pretty - [bool] Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
21
+ # data - [Hash] the attributes to POST
22
+ def add_task_for_section(client, section_gid: required("section_gid"), options: {}, **data)
23
+ path = "/sections/{section_gid}/addTask"
24
+ path["{section_gid}"] = section_gid
25
+ parse(client.post(path, body: data, options: options)).first
26
+ end
27
+
28
+ # Create a section in a project
29
+ #
30
+ # project_gid - [str] (required) Globally unique identifier for the project.
31
+ # options - [Hash] the request I/O options
32
+ # > opt_fields - [list[str]] Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
33
+ # > opt_pretty - [bool] Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
34
+ # data - [Hash] the attributes to POST
35
+ def create_section_for_project(client, project_gid: required("project_gid"), options: {}, **data)
36
+ path = "/projects/{project_gid}/sections"
37
+ path["{project_gid}"] = project_gid
38
+ Section.new(parse(client.post(path, body: data, options: options)).first, client: client)
39
+ end
40
+
41
+ # Delete a section
42
+ #
43
+ # section_gid - [str] (required) The globally unique identifier for the section.
44
+ # options - [Hash] the request I/O options
45
+ # > opt_fields - [list[str]] Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
46
+ # > opt_pretty - [bool] Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
47
+ def delete_section(client, section_gid: required("section_gid"), options: {})
48
+ path = "/sections/{section_gid}"
49
+ path["{section_gid}"] = section_gid
50
+ parse(client.delete(path, options: options)).first
51
+ end
52
+
53
+ # Get a section
54
+ #
55
+ # section_gid - [str] (required) The globally unique identifier for the section.
56
+ # options - [Hash] the request I/O options
57
+ # > opt_fields - [list[str]] Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
58
+ # > opt_pretty - [bool] Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
59
+ def get_section(client, section_gid: required("section_gid"), options: {})
60
+ path = "/sections/{section_gid}"
61
+ path["{section_gid}"] = section_gid
62
+ Section.new(parse(client.get(path, options: options)).first, client: client)
63
+ end
64
+
65
+ # Get sections in a project
66
+ #
67
+ # project_gid - [str] (required) Globally unique identifier for the project.
68
+ # options - [Hash] the request I/O options
69
+ # > offset - [str] Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. 'Note: You can only pass in an offset that was returned to you via a previously paginated request.'
70
+ # > limit - [int] Results per page. The number of objects to return per page. The value must be between 1 and 100.
71
+ # > opt_fields - [list[str]] Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
72
+ # > opt_pretty - [bool] Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
73
+ def get_sections_for_project(client, project_gid: required("project_gid"), options: {})
74
+ path = "/projects/{project_gid}/sections"
75
+ path["{project_gid}"] = project_gid
76
+ Collection.new(parse(client.get(path, options: options)), type: Section, client: client)
77
+ end
78
+
79
+ # Move or Insert sections
80
+ #
81
+ # project_gid - [str] (required) Globally unique identifier for the project.
82
+ # options - [Hash] the request I/O options
83
+ # > opt_fields - [list[str]] Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
84
+ # > opt_pretty - [bool] Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
85
+ # data - [Hash] the attributes to POST
86
+ def insert_section_for_project(client, project_gid: required("project_gid"), options: {}, **data)
87
+ path = "/projects/{project_gid}/sections/insert"
88
+ path["{project_gid}"] = project_gid
89
+ parse(client.post(path, body: data, options: options)).first
90
+ end
91
+
92
+ # Update a section
93
+ #
94
+ # section_gid - [str] (required) The globally unique identifier for the section.
95
+ # options - [Hash] the request I/O options
96
+ # > opt_fields - [list[str]] Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
97
+ # > opt_pretty - [bool] Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
98
+ # data - [Hash] the attributes to PUT
99
+ def update_section(client, section_gid: required("section_gid"), options: {}, **data)
100
+ path = "/sections/{section_gid}"
101
+ path["{section_gid}"] = section_gid
102
+ Section.new(parse(client.put(path, body: data, options: options)).first, client: client)
103
+ end
104
+
105
+ end
106
+ end
107
+ end
108
+ end
@@ -0,0 +1,84 @@
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
+ module Asana
7
+ module Resources
8
+ class StoriesBase < Resource
9
+
10
+ def self.inherited(base)
11
+ Registry.register(base)
12
+ end
13
+
14
+ class << self
15
+ # Create a story on a task
16
+ #
17
+ # task_gid - [str] (required) The task to operate on.
18
+ # options - [Hash] the request I/O options
19
+ # > opt_fields - [list[str]] Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
20
+ # > opt_pretty - [bool] Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
21
+ # data - [Hash] the attributes to POST
22
+ def create_story_for_task(client, task_gid: required("task_gid"), options: {}, **data)
23
+ path = "/tasks/{task_gid}/stories"
24
+ path["{task_gid}"] = task_gid
25
+ Story.new(parse(client.post(path, body: data, options: options)).first, client: client)
26
+ end
27
+
28
+ # Delete a story
29
+ #
30
+ # story_gid - [str] (required) Globally unique identifier for the story.
31
+ # options - [Hash] the request I/O options
32
+ # > opt_fields - [list[str]] Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
33
+ # > opt_pretty - [bool] Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
34
+ def delete_story(client, story_gid: required("story_gid"), options: {})
35
+ path = "/stories/{story_gid}"
36
+ path["{story_gid}"] = story_gid
37
+ parse(client.delete(path, options: options)).first
38
+ end
39
+
40
+ # Get stories from a task
41
+ #
42
+ # task_gid - [str] (required) The task to operate on.
43
+ # options - [Hash] the request I/O options
44
+ # > offset - [str] Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. 'Note: You can only pass in an offset that was returned to you via a previously paginated request.'
45
+ # > limit - [int] Results per page. The number of objects to return per page. The value must be between 1 and 100.
46
+ # > opt_fields - [list[str]] Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
47
+ # > opt_pretty - [bool] Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
48
+ def get_stories_for_task(client, task_gid: required("task_gid"), options: {})
49
+ path = "/tasks/{task_gid}/stories"
50
+ path["{task_gid}"] = task_gid
51
+ Collection.new(parse(client.get(path, options: options)), type: Story, client: client)
52
+ end
53
+
54
+ # Get a story
55
+ #
56
+ # story_gid - [str] (required) Globally unique identifier for the story.
57
+ # options - [Hash] the request I/O options
58
+ # > offset - [str] Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. 'Note: You can only pass in an offset that was returned to you via a previously paginated request.'
59
+ # > limit - [int] Results per page. The number of objects to return per page. The value must be between 1 and 100.
60
+ # > opt_fields - [list[str]] Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
61
+ # > opt_pretty - [bool] Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
62
+ def get_story(client, story_gid: required("story_gid"), options: {})
63
+ path = "/stories/{story_gid}"
64
+ path["{story_gid}"] = story_gid
65
+ Story.new(parse(client.get(path, options: options)).first, client: client)
66
+ end
67
+
68
+ # Update a story
69
+ #
70
+ # story_gid - [str] (required) Globally unique identifier for the story.
71
+ # options - [Hash] the request I/O options
72
+ # > opt_fields - [list[str]] Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
73
+ # > opt_pretty - [bool] Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
74
+ # data - [Hash] the attributes to PUT
75
+ def update_story(client, story_gid: required("story_gid"), options: {}, **data)
76
+ path = "/stories/{story_gid}"
77
+ path["{story_gid}"] = story_gid
78
+ Story.new(parse(client.put(path, body: data, options: options)).first, client: client)
79
+ end
80
+
81
+ end
82
+ end
83
+ end
84
+ end
@@ -0,0 +1,129 @@
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
+ module Asana
7
+ module Resources
8
+ class TagsBase < Resource
9
+
10
+ def self.inherited(base)
11
+ Registry.register(base)
12
+ end
13
+
14
+ class << self
15
+ # Create a tag
16
+ #
17
+
18
+ # options - [Hash] the request I/O options
19
+ # > opt_fields - [list[str]] Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
20
+ # > opt_pretty - [bool] Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
21
+ # data - [Hash] the attributes to POST
22
+ def create_tag(client, options: {}, **data)
23
+ path = "/tags"
24
+ Tag.new(parse(client.post(path, body: data, options: options)).first, client: client)
25
+ end
26
+
27
+ # Create a tag in a workspace
28
+ #
29
+ # workspace_gid - [str] (required) Globally unique identifier for the workspace or organization.
30
+ # options - [Hash] the request I/O options
31
+ # > opt_fields - [list[str]] Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
32
+ # > opt_pretty - [bool] Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
33
+ # data - [Hash] the attributes to POST
34
+ def create_tag_for_workspace(client, workspace_gid: required("workspace_gid"), options: {}, **data)
35
+ path = "/workspaces/{workspace_gid}/tags"
36
+ path["{workspace_gid}"] = workspace_gid
37
+ Tag.new(parse(client.post(path, body: data, options: options)).first, client: client)
38
+ end
39
+
40
+ # Delete a tag
41
+ #
42
+ # tag_gid - [str] (required) Globally unique identifier for the tag.
43
+ # options - [Hash] the request I/O options
44
+ # > offset - [str] Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. 'Note: You can only pass in an offset that was returned to you via a previously paginated request.'
45
+ # > limit - [int] Results per page. The number of objects to return per page. The value must be between 1 and 100.
46
+ # > opt_fields - [list[str]] Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
47
+ # > opt_pretty - [bool] Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
48
+ def delete_tag(client, tag_gid: required("tag_gid"), options: {})
49
+ path = "/tags/{tag_gid}"
50
+ path["{tag_gid}"] = tag_gid
51
+ parse(client.delete(path, options: options)).first
52
+ end
53
+
54
+ # Get a tag
55
+ #
56
+ # tag_gid - [str] (required) Globally unique identifier for the tag.
57
+ # options - [Hash] the request I/O options
58
+ # > offset - [str] Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. 'Note: You can only pass in an offset that was returned to you via a previously paginated request.'
59
+ # > limit - [int] Results per page. The number of objects to return per page. The value must be between 1 and 100.
60
+ # > opt_fields - [list[str]] Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
61
+ # > opt_pretty - [bool] Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
62
+ def get_tag(client, tag_gid: required("tag_gid"), options: {})
63
+ path = "/tags/{tag_gid}"
64
+ path["{tag_gid}"] = tag_gid
65
+ Tag.new(parse(client.get(path, options: options)).first, client: client)
66
+ end
67
+
68
+ # Get multiple tags
69
+ #
70
+
71
+ # workspace - [str] The workspace to filter tags on.
72
+ # options - [Hash] the request I/O options
73
+ # > offset - [str] Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. 'Note: You can only pass in an offset that was returned to you via a previously paginated request.'
74
+ # > limit - [int] Results per page. The number of objects to return per page. The value must be between 1 and 100.
75
+ # > opt_fields - [list[str]] Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
76
+ # > opt_pretty - [bool] Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
77
+ def get_tags(client, workspace: nil, options: {})
78
+ path = "/tags"
79
+ params = { workspace: workspace }.reject { |_,v| v.nil? || Array(v).empty? }
80
+ Collection.new(parse(client.get(path, params: params, options: options)), type: Tag, client: client)
81
+ end
82
+
83
+ # Get a task's tags
84
+ #
85
+ # task_gid - [str] (required) The task to operate on.
86
+ # options - [Hash] the request I/O options
87
+ # > offset - [str] Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. 'Note: You can only pass in an offset that was returned to you via a previously paginated request.'
88
+ # > limit - [int] Results per page. The number of objects to return per page. The value must be between 1 and 100.
89
+ # > opt_fields - [list[str]] Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
90
+ # > opt_pretty - [bool] Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
91
+ def get_tags_for_task(client, task_gid: required("task_gid"), options: {})
92
+ path = "/tasks/{task_gid}/tags"
93
+ path["{task_gid}"] = task_gid
94
+ Collection.new(parse(client.get(path, options: options)), type: Tag, client: client)
95
+ end
96
+
97
+ # Get tags in a workspace
98
+ #
99
+ # workspace_gid - [str] (required) Globally unique identifier for the workspace or organization.
100
+ # options - [Hash] the request I/O options
101
+ # > offset - [str] Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. 'Note: You can only pass in an offset that was returned to you via a previously paginated request.'
102
+ # > limit - [int] Results per page. The number of objects to return per page. The value must be between 1 and 100.
103
+ # > opt_fields - [list[str]] Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
104
+ # > opt_pretty - [bool] Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
105
+ def get_tags_for_workspace(client, workspace_gid: required("workspace_gid"), options: {})
106
+ path = "/workspaces/{workspace_gid}/tags"
107
+ path["{workspace_gid}"] = workspace_gid
108
+ Collection.new(parse(client.get(path, options: options)), type: Tag, client: client)
109
+ end
110
+
111
+ # Update a tag
112
+ #
113
+ # tag_gid - [str] (required) Globally unique identifier for the tag.
114
+ # options - [Hash] the request I/O options
115
+ # > offset - [str] Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. 'Note: You can only pass in an offset that was returned to you via a previously paginated request.'
116
+ # > limit - [int] Results per page. The number of objects to return per page. The value must be between 1 and 100.
117
+ # > opt_fields - [list[str]] Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
118
+ # > opt_pretty - [bool] Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
119
+ # data - [Hash] the attributes to PUT
120
+ def update_tag(client, tag_gid: required("tag_gid"), options: {}, **data)
121
+ path = "/tags/{tag_gid}"
122
+ path["{tag_gid}"] = tag_gid
123
+ Tag.new(parse(client.put(path, body: data, options: options)).first, client: client)
124
+ end
125
+
126
+ end
127
+ end
128
+ end
129
+ end