asana 0.10.13 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.ruby-version +1 -1
- data/Gemfile.lock +3 -3
- data/VERSION +1 -1
- data/lib/asana/resources/gen/attachments_base.rb +7 -6
- data/lib/asana/resources/gen/goals_base.rb +33 -22
- data/lib/asana/resources/gen/status_updates_base.rb +1 -1
- data/lib/asana/resources/gen/tasks_base.rb +5 -3
- data/lib/asana/resources/gen/teams_base.rb +14 -14
- data/lib/asana/resources/gen/workspaces_base.rb +1 -1
- data/lib/asana/version.rb +1 -1
- data/samples/attachments_sample.yaml +3 -3
- data/samples/goals_sample.yaml +11 -11
- data/samples/teams_sample.yaml +4 -4
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0a4e97c4ca97737835acf2af6cc261b767770ee3a16743e88aabe1bd86e81173
|
4
|
+
data.tar.gz: 5794d53e835b7c06820d0c0487820486c8a88338c4037302159560e4ea1c0cce
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 37629874aeb92b99355aa0074aa010f8d7d98ebe208530c7d02e875676f291f733a915e7c972e0780e4f6f535d438c59f08f5df7b5bcc5296d5ead283ffff4d1
|
7
|
+
data.tar.gz: bbdbf4440eb4b10214e97a0db1e88ae8ac7eaa930d8c634efe4e7d63e71a66f0588f1fa4c3ce439b7647bae9d8eba61d17314a3dde2579005b5c7b2e125ddc17
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.
|
1
|
+
2.5.0
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
asana (0.
|
4
|
+
asana (1.0.0)
|
5
5
|
faraday (~> 1.0)
|
6
6
|
faraday_middleware (~> 1.0)
|
7
7
|
faraday_middleware-multi_json (~> 0.0)
|
@@ -83,7 +83,7 @@ GEM
|
|
83
83
|
notiffany (0.1.3)
|
84
84
|
nenv (~> 0.1)
|
85
85
|
shellany (~> 0.0)
|
86
|
-
oauth2 (2.0.
|
86
|
+
oauth2 (2.0.3)
|
87
87
|
faraday (>= 0.17.3, < 3.0)
|
88
88
|
jwt (>= 1.0, < 3.0)
|
89
89
|
multi_xml (~> 0.5)
|
@@ -141,7 +141,7 @@ GEM
|
|
141
141
|
thor (1.2.1)
|
142
142
|
tomparse (0.4.2)
|
143
143
|
unicode-display_width (1.8.0)
|
144
|
-
version_gem (1.
|
144
|
+
version_gem (1.1.0)
|
145
145
|
webrick (1.7.0)
|
146
146
|
yard (0.9.28)
|
147
147
|
webrick (~> 1.7.0)
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
1.0.0
|
@@ -36,18 +36,19 @@ module Asana
|
|
36
36
|
Attachment.new(parse(client.get(path, options: options)).first, client: client)
|
37
37
|
end
|
38
38
|
|
39
|
-
# Get attachments
|
39
|
+
# Get attachments from an object
|
40
40
|
#
|
41
|
-
|
41
|
+
|
42
|
+
# parent - [str] (required) Globally unique identifier for object to fetch statuses from. Must be a GID for a task or project_brief.
|
42
43
|
# options - [Hash] the request I/O options
|
43
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.'
|
44
45
|
# > limit - [int] Results per page. The number of objects to return per page. The value must be between 1 and 100.
|
45
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.
|
46
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.
|
47
|
-
def
|
48
|
-
path = "/
|
49
|
-
|
50
|
-
Collection.new(parse(client.get(path, options: options)), type: Attachment, client: client)
|
48
|
+
def get_attachments_for_object(client, parent: nil, options: {})
|
49
|
+
path = "/attachments"
|
50
|
+
params = { parent: parent }.reject { |_,v| v.nil? || Array(v).empty? }
|
51
|
+
Collection.new(parse(client.get(path, params: params, options: options)), type: Attachment, client: client)
|
51
52
|
end
|
52
53
|
|
53
54
|
end
|
@@ -14,37 +14,40 @@ module Asana
|
|
14
14
|
class << self
|
15
15
|
# Add a collaborator to a goal
|
16
16
|
#
|
17
|
-
|
17
|
+
# goal_gid - [str] (required) Globally unique identifier for the goal.
|
18
18
|
# options - [Hash] the request I/O options
|
19
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
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
21
|
# data - [Hash] the attributes to POST
|
22
|
-
def add_followers(client, options: {}, **data)
|
22
|
+
def add_followers(client, goal_gid: required("goal_gid"), options: {}, **data)
|
23
23
|
path = "/goals/{goal_gid}/addFollowers"
|
24
|
+
path["{goal_gid}"] = goal_gid
|
24
25
|
parse(client.post(path, body: data, options: options)).first
|
25
26
|
end
|
26
27
|
|
27
28
|
# Add a subgoal to a parent goal
|
28
29
|
#
|
29
|
-
|
30
|
+
# goal_gid - [str] (required) Globally unique identifier for the goal.
|
30
31
|
# options - [Hash] the request I/O options
|
31
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.
|
32
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.
|
33
34
|
# data - [Hash] the attributes to POST
|
34
|
-
def add_subgoal(client, options: {}, **data)
|
35
|
+
def add_subgoal(client, goal_gid: required("goal_gid"), options: {}, **data)
|
35
36
|
path = "/goals/{goal_gid}/addSubgoal"
|
37
|
+
path["{goal_gid}"] = goal_gid
|
36
38
|
parse(client.post(path, body: data, options: options)).first
|
37
39
|
end
|
38
40
|
|
39
41
|
# Add a project/portfolio as supporting work for a goal.
|
40
42
|
#
|
41
|
-
|
43
|
+
# goal_gid - [str] (required) Globally unique identifier for the goal.
|
42
44
|
# options - [Hash] the request I/O options
|
43
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.
|
44
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.
|
45
47
|
# data - [Hash] the attributes to POST
|
46
|
-
def add_supporting_work_for_goal(client, options: {}, **data)
|
48
|
+
def add_supporting_work_for_goal(client, goal_gid: required("goal_gid"), options: {}, **data)
|
47
49
|
path = "/goals/{goal_gid}/addSupportingWork"
|
50
|
+
path["{goal_gid}"] = goal_gid
|
48
51
|
parse(client.post(path, body: data, options: options)).first
|
49
52
|
end
|
50
53
|
|
@@ -64,13 +67,14 @@ module Asana
|
|
64
67
|
|
65
68
|
# Create a goal metric
|
66
69
|
#
|
67
|
-
|
70
|
+
# goal_gid - [str] (required) Globally unique identifier for the goal.
|
68
71
|
# options - [Hash] the request I/O options
|
69
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.
|
70
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.
|
71
74
|
# data - [Hash] the attributes to POST
|
72
|
-
def create_goal_metric(client, options: {}, **data)
|
75
|
+
def create_goal_metric(client, goal_gid: required("goal_gid"), options: {}, **data)
|
73
76
|
path = "/goals/{goal_gid}/setMetric"
|
77
|
+
path["{goal_gid}"] = goal_gid
|
74
78
|
parse(client.post(path, body: data, options: options)).first
|
75
79
|
end
|
76
80
|
|
@@ -120,70 +124,76 @@ module Asana
|
|
120
124
|
|
121
125
|
# Get parent goals from a goal
|
122
126
|
#
|
123
|
-
|
127
|
+
# goal_gid - [str] (required) Globally unique identifier for the goal.
|
124
128
|
# options - [Hash] the request I/O options
|
125
129
|
# > 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.
|
126
130
|
# > 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.
|
127
|
-
def get_parent_goals_for_goal(client, options: {})
|
131
|
+
def get_parent_goals_for_goal(client, goal_gid: required("goal_gid"), options: {})
|
128
132
|
path = "/goals/{goal_gid}/parentGoals"
|
133
|
+
path["{goal_gid}"] = goal_gid
|
129
134
|
Collection.new(parse(client.get(path, options: options)), type: Resource, client: client)
|
130
135
|
end
|
131
136
|
|
132
137
|
# Get subgoals from a goal
|
133
138
|
#
|
134
|
-
|
139
|
+
# goal_gid - [str] (required) Globally unique identifier for the goal.
|
135
140
|
# options - [Hash] the request I/O options
|
136
141
|
# > 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.
|
137
142
|
# > 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.
|
138
|
-
def get_subgoals_for_goal(client, options: {})
|
143
|
+
def get_subgoals_for_goal(client, goal_gid: required("goal_gid"), options: {})
|
139
144
|
path = "/goals/{goal_gid}/subgoals"
|
145
|
+
path["{goal_gid}"] = goal_gid
|
140
146
|
Collection.new(parse(client.get(path, options: options)), type: Resource, client: client)
|
141
147
|
end
|
142
148
|
|
143
149
|
# Remove a collaborator from a goal
|
144
150
|
#
|
145
|
-
|
151
|
+
# goal_gid - [str] (required) Globally unique identifier for the goal.
|
146
152
|
# options - [Hash] the request I/O options
|
147
153
|
# > 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.
|
148
154
|
# > 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.
|
149
155
|
# data - [Hash] the attributes to POST
|
150
|
-
def remove_followers(client, options: {}, **data)
|
156
|
+
def remove_followers(client, goal_gid: required("goal_gid"), options: {}, **data)
|
151
157
|
path = "/goals/{goal_gid}/removeFollowers"
|
158
|
+
path["{goal_gid}"] = goal_gid
|
152
159
|
parse(client.post(path, body: data, options: options)).first
|
153
160
|
end
|
154
161
|
|
155
162
|
# Remove a subgoal from a goal
|
156
163
|
#
|
157
|
-
|
164
|
+
# goal_gid - [str] (required) Globally unique identifier for the goal.
|
158
165
|
# options - [Hash] the request I/O options
|
159
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.
|
160
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.
|
161
168
|
# data - [Hash] the attributes to POST
|
162
|
-
def remove_subgoal(client, options: {}, **data)
|
169
|
+
def remove_subgoal(client, goal_gid: required("goal_gid"), options: {}, **data)
|
163
170
|
path = "/goals/{goal_gid}/removeSubgoal"
|
171
|
+
path["{goal_gid}"] = goal_gid
|
164
172
|
parse(client.post(path, body: data, options: options)).first
|
165
173
|
end
|
166
174
|
|
167
175
|
# Remove a project/portfolio as supporting work for a goal.
|
168
176
|
#
|
169
|
-
|
177
|
+
# goal_gid - [str] (required) Globally unique identifier for the goal.
|
170
178
|
# options - [Hash] the request I/O options
|
171
179
|
# > 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.
|
172
180
|
# > 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.
|
173
181
|
# data - [Hash] the attributes to POST
|
174
|
-
def remove_supporting_work_for_goal(client, options: {}, **data)
|
182
|
+
def remove_supporting_work_for_goal(client, goal_gid: required("goal_gid"), options: {}, **data)
|
175
183
|
path = "/goals/{goal_gid}/removeSupportingWork"
|
184
|
+
path["{goal_gid}"] = goal_gid
|
176
185
|
parse(client.post(path, body: data, options: options)).first
|
177
186
|
end
|
178
187
|
|
179
188
|
# Get supporting work from a goal
|
180
189
|
#
|
181
|
-
|
190
|
+
# goal_gid - [str] (required) Globally unique identifier for the goal.
|
182
191
|
# options - [Hash] the request I/O options
|
183
192
|
# > 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.
|
184
193
|
# > 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.
|
185
|
-
def supporting_work(client, options: {})
|
194
|
+
def supporting_work(client, goal_gid: required("goal_gid"), options: {})
|
186
195
|
path = "/goals/{goal_gid}/supportingWork"
|
196
|
+
path["{goal_gid}"] = goal_gid
|
187
197
|
Collection.new(parse(client.get(path, options: options)), type: Project, client: client)
|
188
198
|
end
|
189
199
|
|
@@ -202,13 +212,14 @@ module Asana
|
|
202
212
|
|
203
213
|
# Update a goal metric
|
204
214
|
#
|
205
|
-
|
215
|
+
# goal_gid - [str] (required) Globally unique identifier for the goal.
|
206
216
|
# options - [Hash] the request I/O options
|
207
217
|
# > 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.
|
208
218
|
# > 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.
|
209
219
|
# data - [Hash] the attributes to POST
|
210
|
-
def update_goal_metric(client, options: {}, **data)
|
220
|
+
def update_goal_metric(client, goal_gid: required("goal_gid"), options: {}, **data)
|
211
221
|
path = "/goals/{goal_gid}/setMetricCurrentValue"
|
222
|
+
path["{goal_gid}"] = goal_gid
|
212
223
|
parse(client.post(path, body: data, options: options)).first
|
213
224
|
end
|
214
225
|
|
@@ -53,7 +53,7 @@ module Asana
|
|
53
53
|
# Get status updates from an object
|
54
54
|
#
|
55
55
|
|
56
|
-
# parent - [str] (required) Globally unique identifier for object to fetch statuses from.
|
56
|
+
# parent - [str] (required) Globally unique identifier for object to fetch statuses from. Must be a GID for a project, portfolio, or goal.
|
57
57
|
# created_since - [datetime] Only return statuses that have been created since the given time.
|
58
58
|
# options - [Hash] the request I/O options
|
59
59
|
# > 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.'
|
@@ -184,7 +184,7 @@ module Asana
|
|
184
184
|
# Get multiple tasks
|
185
185
|
#
|
186
186
|
|
187
|
-
# assignee - [str] The assignee to filter tasks on. *Note: If you specify `assignee`, you must also specify the `workspace` to filter on.*
|
187
|
+
# assignee - [str] The assignee to filter tasks on. If searching for unassigned tasks, assignee.any = null can be specified. *Note: If you specify `assignee`, you must also specify the `workspace` to filter on.*
|
188
188
|
# project - [str] The project to filter tasks on.
|
189
189
|
# section - [str] The section to filter tasks on. *Note: Currently, this is only supported in board views.*
|
190
190
|
# workspace - [str] The workspace to filter tasks on. *Note: If you specify `workspace`, you must also specify the `assignee` to filter on.*
|
@@ -204,15 +204,17 @@ module Asana
|
|
204
204
|
# Get tasks from a project
|
205
205
|
#
|
206
206
|
# project_gid - [str] (required) Globally unique identifier for the project.
|
207
|
+
# completed_since - [str] Only return tasks that are either incomplete or that have been completed since this time. Accepts a date-time string or the keyword *now*.
|
207
208
|
# options - [Hash] the request I/O options
|
208
209
|
# > 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.'
|
209
210
|
# > limit - [int] Results per page. The number of objects to return per page. The value must be between 1 and 100.
|
210
211
|
# > 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.
|
211
212
|
# > 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.
|
212
|
-
def get_tasks_for_project(client, project_gid: required("project_gid"), options: {})
|
213
|
+
def get_tasks_for_project(client, project_gid: required("project_gid"), completed_since: nil, options: {})
|
213
214
|
path = "/projects/{project_gid}/tasks"
|
214
215
|
path["{project_gid}"] = project_gid
|
215
|
-
|
216
|
+
params = { completed_since: completed_since }.reject { |_,v| v.nil? || Array(v).empty? }
|
217
|
+
Collection.new(parse(client.get(path, params: params, options: options)), type: Task, client: client)
|
216
218
|
end
|
217
219
|
|
218
220
|
# Get tasks from a section
|
@@ -53,20 +53,6 @@ module Asana
|
|
53
53
|
Team.new(parse(client.get(path, options: options)).first, client: client)
|
54
54
|
end
|
55
55
|
|
56
|
-
# Get teams in an organization
|
57
|
-
#
|
58
|
-
# workspace_gid - [str] (required) Globally unique identifier for the workspace or organization.
|
59
|
-
# options - [Hash] the request I/O options
|
60
|
-
# > 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.'
|
61
|
-
# > limit - [int] Results per page. The number of objects to return per page. The value must be between 1 and 100.
|
62
|
-
# > 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.
|
63
|
-
# > 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.
|
64
|
-
def get_teams_for_organization(client, workspace_gid: required("workspace_gid"), options: {})
|
65
|
-
path = "/organizations/{workspace_gid}/teams"
|
66
|
-
path["{workspace_gid}"] = workspace_gid
|
67
|
-
Collection.new(parse(client.get(path, options: options)), type: Team, client: client)
|
68
|
-
end
|
69
|
-
|
70
56
|
# Get teams for a user
|
71
57
|
#
|
72
58
|
# user_gid - [str] (required) A string identifying a user. This can either be the string \"me\", an email, or the gid of a user.
|
@@ -83,6 +69,20 @@ module Asana
|
|
83
69
|
Collection.new(parse(client.get(path, params: params, options: options)), type: Team, client: client)
|
84
70
|
end
|
85
71
|
|
72
|
+
# Get teams in a workspace
|
73
|
+
#
|
74
|
+
# workspace_gid - [str] (required) Globally unique identifier for the workspace or organization.
|
75
|
+
# options - [Hash] the request I/O options
|
76
|
+
# > 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.'
|
77
|
+
# > limit - [int] Results per page. The number of objects to return per page. The value must be between 1 and 100.
|
78
|
+
# > 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.
|
79
|
+
# > 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.
|
80
|
+
def get_teams_for_workspace(client, workspace_gid: required("workspace_gid"), options: {})
|
81
|
+
path = "/workspaces/{workspace_gid}/teams"
|
82
|
+
path["{workspace_gid}"] = workspace_gid
|
83
|
+
Collection.new(parse(client.get(path, options: options)), type: Team, client: client)
|
84
|
+
end
|
85
|
+
|
86
86
|
# Remove a user from a team
|
87
87
|
#
|
88
88
|
# team_gid - [str] (required) Globally unique identifier for the team.
|
@@ -22,7 +22,7 @@ module Asana
|
|
22
22
|
def add_user_for_workspace(client, workspace_gid: required("workspace_gid"), options: {}, **data)
|
23
23
|
path = "/workspaces/{workspace_gid}/addUser"
|
24
24
|
path["{workspace_gid}"] = workspace_gid
|
25
|
-
|
25
|
+
parse(client.post(path, body: data, options: options)).first
|
26
26
|
end
|
27
27
|
|
28
28
|
# Get a workspace
|
data/lib/asana/version.rb
CHANGED
@@ -8,7 +8,7 @@ attachments:
|
|
8
8
|
end
|
9
9
|
|
10
10
|
|
11
|
-
result = client.attachments.create_attachment_for_task(
|
11
|
+
result = client.attachments.create_attachment_for_task(field: "value", field: "value", options: {pretty: true})
|
12
12
|
delete_attachment: >-
|
13
13
|
require 'asana'
|
14
14
|
|
@@ -29,7 +29,7 @@ attachments:
|
|
29
29
|
|
30
30
|
|
31
31
|
result = client.attachments.get_attachment(attachment_gid: 'attachment_gid', param: "value", param: "value", options: {pretty: true})
|
32
|
-
|
32
|
+
get_attachments_for_object: >-
|
33
33
|
require 'asana'
|
34
34
|
|
35
35
|
|
@@ -38,4 +38,4 @@ attachments:
|
|
38
38
|
end
|
39
39
|
|
40
40
|
|
41
|
-
result = client.attachments.
|
41
|
+
result = client.attachments.get_attachments_for_object(parent: ''parent_example'', param: "value", param: "value", options: {pretty: true})
|
data/samples/goals_sample.yaml
CHANGED
@@ -8,7 +8,7 @@ goals:
|
|
8
8
|
end
|
9
9
|
|
10
10
|
|
11
|
-
result = client.goals.add_followers(field: "value", field: "value", options: {pretty: true})
|
11
|
+
result = client.goals.add_followers(goal_gid: 'goal_gid', field: "value", field: "value", options: {pretty: true})
|
12
12
|
add_subgoal: >-
|
13
13
|
require 'asana'
|
14
14
|
|
@@ -18,7 +18,7 @@ goals:
|
|
18
18
|
end
|
19
19
|
|
20
20
|
|
21
|
-
result = client.goals.add_subgoal(field: "value", field: "value", options: {pretty: true})
|
21
|
+
result = client.goals.add_subgoal(goal_gid: 'goal_gid', field: "value", field: "value", options: {pretty: true})
|
22
22
|
add_supporting_work_for_goal: >-
|
23
23
|
require 'asana'
|
24
24
|
|
@@ -28,7 +28,7 @@ goals:
|
|
28
28
|
end
|
29
29
|
|
30
30
|
|
31
|
-
result = client.goals.add_supporting_work_for_goal(field: "value", field: "value", options: {pretty: true})
|
31
|
+
result = client.goals.add_supporting_work_for_goal(goal_gid: 'goal_gid', field: "value", field: "value", options: {pretty: true})
|
32
32
|
create_goal: >-
|
33
33
|
require 'asana'
|
34
34
|
|
@@ -48,7 +48,7 @@ goals:
|
|
48
48
|
end
|
49
49
|
|
50
50
|
|
51
|
-
result = client.goals.create_goal_metric(field: "value", field: "value", options: {pretty: true})
|
51
|
+
result = client.goals.create_goal_metric(goal_gid: 'goal_gid', field: "value", field: "value", options: {pretty: true})
|
52
52
|
delete_goal: >-
|
53
53
|
require 'asana'
|
54
54
|
|
@@ -88,7 +88,7 @@ goals:
|
|
88
88
|
end
|
89
89
|
|
90
90
|
|
91
|
-
result = client.goals.get_parent_goals_for_goal(param: "value", param: "value", options: {pretty: true})
|
91
|
+
result = client.goals.get_parent_goals_for_goal(goal_gid: 'goal_gid', param: "value", param: "value", options: {pretty: true})
|
92
92
|
get_subgoals_for_goal: >-
|
93
93
|
require 'asana'
|
94
94
|
|
@@ -98,7 +98,7 @@ goals:
|
|
98
98
|
end
|
99
99
|
|
100
100
|
|
101
|
-
result = client.goals.get_subgoals_for_goal(param: "value", param: "value", options: {pretty: true})
|
101
|
+
result = client.goals.get_subgoals_for_goal(goal_gid: 'goal_gid', param: "value", param: "value", options: {pretty: true})
|
102
102
|
remove_followers: >-
|
103
103
|
require 'asana'
|
104
104
|
|
@@ -108,7 +108,7 @@ goals:
|
|
108
108
|
end
|
109
109
|
|
110
110
|
|
111
|
-
result = client.goals.remove_followers(field: "value", field: "value", options: {pretty: true})
|
111
|
+
result = client.goals.remove_followers(goal_gid: 'goal_gid', field: "value", field: "value", options: {pretty: true})
|
112
112
|
remove_subgoal: >-
|
113
113
|
require 'asana'
|
114
114
|
|
@@ -118,7 +118,7 @@ goals:
|
|
118
118
|
end
|
119
119
|
|
120
120
|
|
121
|
-
result = client.goals.remove_subgoal(field: "value", field: "value", options: {pretty: true})
|
121
|
+
result = client.goals.remove_subgoal(goal_gid: 'goal_gid', field: "value", field: "value", options: {pretty: true})
|
122
122
|
remove_supporting_work_for_goal: >-
|
123
123
|
require 'asana'
|
124
124
|
|
@@ -128,7 +128,7 @@ goals:
|
|
128
128
|
end
|
129
129
|
|
130
130
|
|
131
|
-
result = client.goals.remove_supporting_work_for_goal(field: "value", field: "value", options: {pretty: true})
|
131
|
+
result = client.goals.remove_supporting_work_for_goal(goal_gid: 'goal_gid', field: "value", field: "value", options: {pretty: true})
|
132
132
|
supporting_work: >-
|
133
133
|
require 'asana'
|
134
134
|
|
@@ -138,7 +138,7 @@ goals:
|
|
138
138
|
end
|
139
139
|
|
140
140
|
|
141
|
-
result = client.goals.supporting_work(param: "value", param: "value", options: {pretty: true})
|
141
|
+
result = client.goals.supporting_work(goal_gid: 'goal_gid', param: "value", param: "value", options: {pretty: true})
|
142
142
|
update_goal: >-
|
143
143
|
require 'asana'
|
144
144
|
|
@@ -158,4 +158,4 @@ goals:
|
|
158
158
|
end
|
159
159
|
|
160
160
|
|
161
|
-
result = client.goals.update_goal_metric(field: "value", field: "value", options: {pretty: true})
|
161
|
+
result = client.goals.update_goal_metric(goal_gid: 'goal_gid', field: "value", field: "value", options: {pretty: true})
|
data/samples/teams_sample.yaml
CHANGED
@@ -29,7 +29,7 @@ teams:
|
|
29
29
|
|
30
30
|
|
31
31
|
result = client.teams.get_team(team_gid: 'team_gid', param: "value", param: "value", options: {pretty: true})
|
32
|
-
|
32
|
+
get_teams_for_user: >-
|
33
33
|
require 'asana'
|
34
34
|
|
35
35
|
|
@@ -38,8 +38,8 @@ teams:
|
|
38
38
|
end
|
39
39
|
|
40
40
|
|
41
|
-
result = client.teams.
|
42
|
-
|
41
|
+
result = client.teams.get_teams_for_user(user_gid: 'user_gid', organization: ''organization_example'', param: "value", param: "value", options: {pretty: true})
|
42
|
+
get_teams_for_workspace: >-
|
43
43
|
require 'asana'
|
44
44
|
|
45
45
|
|
@@ -48,7 +48,7 @@ teams:
|
|
48
48
|
end
|
49
49
|
|
50
50
|
|
51
|
-
result = client.teams.
|
51
|
+
result = client.teams.get_teams_for_workspace(workspace_gid: 'workspace_gid', param: "value", param: "value", options: {pretty: true})
|
52
52
|
remove_user_for_team: >-
|
53
53
|
require 'asana'
|
54
54
|
|
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.
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Txus
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-06-
|
11
|
+
date: 2022-06-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: oauth2
|