asana 0.10.3 → 0.10.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/build.yml +24 -0
- data/.github/workflows/pubilsh-to-rubygem.yml +18 -0
- data/.github/workflows/publish-to-github-releases.yml +16 -0
- data/.gitignore +0 -1
- data/Gemfile.lock +169 -0
- data/README.md +22 -9
- data/Rakefile +10 -14
- data/VERSION +1 -1
- data/asana.gemspec +2 -2
- data/examples/Gemfile.lock +2 -2
- data/lib/asana/http_client/error_handling.rb +11 -4
- data/lib/asana/resources/gen/audit_log_api_base.rb +37 -0
- data/lib/asana/resources/gen/goals_base.rb +218 -0
- data/lib/asana/resources/gen/project_briefs_base.rb +68 -0
- data/lib/asana/resources/gen/project_templates_base.rb +73 -0
- data/lib/asana/resources/gen/projects_base.rb +13 -0
- data/lib/asana/resources/gen/status_updates_base.rb +72 -0
- data/lib/asana/resources/gen/tasks_base.rb +2 -6
- data/lib/asana/resources/gen/teams_base.rb +15 -1
- data/lib/asana/resources/gen/time_periods_base.rb +47 -0
- data/lib/asana/resources/gen/typeahead_base.rb +1 -1
- data/lib/asana/resources/gen/users_base.rb +3 -4
- data/lib/asana/resources/gen/webhooks_base.rb +13 -0
- data/lib/asana/resources/portfolio.rb +3 -3
- data/lib/asana/version.rb +1 -1
- data/package-lock.json +115 -0
- data/samples/audit_log_api_sample.yaml +11 -0
- data/samples/goals_sample.yaml +161 -0
- data/samples/project_briefs_sample.yaml +41 -0
- data/samples/project_templates_sample.yaml +41 -0
- data/samples/projects_sample.yaml +10 -0
- data/samples/status_updates_sample.yaml +41 -0
- data/samples/teams_sample.yaml +10 -0
- data/samples/time_periods_sample.yaml +21 -0
- data/samples/webhooks_sample.yaml +10 -0
- metadata +28 -12
- data/.travis.yml +0 -16
@@ -0,0 +1,218 @@
|
|
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 GoalsBase < Resource
|
9
|
+
|
10
|
+
def self.inherited(base)
|
11
|
+
Registry.register(base)
|
12
|
+
end
|
13
|
+
|
14
|
+
class << self
|
15
|
+
# Add a collaborator to a goal
|
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 add_followers(client, options: {}, **data)
|
23
|
+
path = "/goals/{goal_gid}/addFollowers"
|
24
|
+
parse(client.post(path, body: data, options: options)).first
|
25
|
+
end
|
26
|
+
|
27
|
+
# Add a subgoal to a parent goal
|
28
|
+
#
|
29
|
+
|
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_subgoal(client, options: {}, **data)
|
35
|
+
path = "/goals/{goal_gid}/addSubgoal"
|
36
|
+
parse(client.post(path, body: data, options: options)).first
|
37
|
+
end
|
38
|
+
|
39
|
+
# Add a project/portfolio as supporting work for a goal.
|
40
|
+
#
|
41
|
+
|
42
|
+
# options - [Hash] the request I/O options
|
43
|
+
# > 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
|
+
# > 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
|
+
# data - [Hash] the attributes to POST
|
46
|
+
def add_supporting_work_for_goal(client, options: {}, **data)
|
47
|
+
path = "/goals/{goal_gid}/addSupportingWork"
|
48
|
+
parse(client.post(path, body: data, options: options)).first
|
49
|
+
end
|
50
|
+
|
51
|
+
# Create a goal
|
52
|
+
#
|
53
|
+
|
54
|
+
# options - [Hash] the request I/O options
|
55
|
+
# > 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.'
|
56
|
+
# > limit - [int] Results per page. The number of objects to return per page. The value must be between 1 and 100.
|
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_goal(client, options: {}, **data)
|
61
|
+
path = "/goals"
|
62
|
+
parse(client.post(path, body: data, options: options)).first
|
63
|
+
end
|
64
|
+
|
65
|
+
# Create a goal metric
|
66
|
+
#
|
67
|
+
|
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_goal_metric(client, options: {}, **data)
|
73
|
+
path = "/goals/{goal_gid}/setMetric"
|
74
|
+
parse(client.post(path, body: data, options: options)).first
|
75
|
+
end
|
76
|
+
|
77
|
+
# Delete a goal
|
78
|
+
#
|
79
|
+
# goal_gid - [str] (required) Globally unique identifier for the goal.
|
80
|
+
# options - [Hash] the request I/O options
|
81
|
+
# > 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.
|
82
|
+
# > 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.
|
83
|
+
def delete_goal(client, goal_gid: required("goal_gid"), options: {})
|
84
|
+
path = "/goals/{goal_gid}"
|
85
|
+
path["{goal_gid}"] = goal_gid
|
86
|
+
parse(client.delete(path, options: options)).first
|
87
|
+
end
|
88
|
+
|
89
|
+
# Get a goal
|
90
|
+
#
|
91
|
+
# goal_gid - [str] (required) Globally unique identifier for the goal.
|
92
|
+
# options - [Hash] the request I/O options
|
93
|
+
# > 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.
|
94
|
+
# > 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.
|
95
|
+
def get_goal(client, goal_gid: required("goal_gid"), options: {})
|
96
|
+
path = "/goals/{goal_gid}"
|
97
|
+
path["{goal_gid}"] = goal_gid
|
98
|
+
parse(client.get(path, options: options)).first
|
99
|
+
end
|
100
|
+
|
101
|
+
# Get goals
|
102
|
+
#
|
103
|
+
|
104
|
+
# portfolio - [str] Globally unique identifier for supporting portfolio.
|
105
|
+
# project - [str] Globally unique identifier for supporting project.
|
106
|
+
# is_workspace_level - [bool] Filter to goals with is_workspace_level set to query value. Must be used with the workspace parameter.
|
107
|
+
# team - [str] Globally unique identifier for the team.
|
108
|
+
# workspace - [str] Globally unique identifier for the workspace.
|
109
|
+
# time_periods - [list[str]] Globally unique identifiers for the time periods.
|
110
|
+
# options - [Hash] the request I/O options
|
111
|
+
# > 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.'
|
112
|
+
# > limit - [int] Results per page. The number of objects to return per page. The value must be between 1 and 100.
|
113
|
+
# > 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.
|
114
|
+
# > 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.
|
115
|
+
def get_goals(client, portfolio: nil, project: nil, is_workspace_level: nil, team: nil, workspace: nil, time_periods: nil, options: {})
|
116
|
+
path = "/goals"
|
117
|
+
params = { portfolio: portfolio, project: project, is_workspace_level: is_workspace_level, team: team, workspace: workspace, time_periods: time_periods }.reject { |_,v| v.nil? || Array(v).empty? }
|
118
|
+
Collection.new(parse(client.get(path, params: params, options: options)), type: Resource, client: client)
|
119
|
+
end
|
120
|
+
|
121
|
+
# Get parent goals from a goal
|
122
|
+
#
|
123
|
+
|
124
|
+
# options - [Hash] the request I/O options
|
125
|
+
# > 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
|
+
# > 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: {})
|
128
|
+
path = "/goals/{goal_gid}/parentGoals"
|
129
|
+
Collection.new(parse(client.get(path, options: options)), type: Resource, client: client)
|
130
|
+
end
|
131
|
+
|
132
|
+
# Get subgoals from a goal
|
133
|
+
#
|
134
|
+
|
135
|
+
# options - [Hash] the request I/O options
|
136
|
+
# > 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
|
+
# > 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: {})
|
139
|
+
path = "/goals/{goal_gid}/subgoals"
|
140
|
+
Collection.new(parse(client.get(path, options: options)), type: Resource, client: client)
|
141
|
+
end
|
142
|
+
|
143
|
+
# Remove a collaborator from a goal
|
144
|
+
#
|
145
|
+
|
146
|
+
# options - [Hash] the request I/O options
|
147
|
+
# > 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
|
+
# > 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
|
+
# data - [Hash] the attributes to POST
|
150
|
+
def remove_followers(client, options: {}, **data)
|
151
|
+
path = "/goals/{goal_gid}/removeFollowers"
|
152
|
+
parse(client.post(path, body: data, options: options)).first
|
153
|
+
end
|
154
|
+
|
155
|
+
# Remove a subgoal from a goal
|
156
|
+
#
|
157
|
+
|
158
|
+
# options - [Hash] the request I/O options
|
159
|
+
# > 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
|
+
# > 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
|
+
# data - [Hash] the attributes to POST
|
162
|
+
def remove_subgoal(client, options: {}, **data)
|
163
|
+
path = "/goals/{goal_gid}/removeSubgoal"
|
164
|
+
parse(client.post(path, body: data, options: options)).first
|
165
|
+
end
|
166
|
+
|
167
|
+
# Remove a project/portfolio as supporting work for a goal.
|
168
|
+
#
|
169
|
+
|
170
|
+
# options - [Hash] the request I/O options
|
171
|
+
# > 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
|
+
# > 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
|
+
# data - [Hash] the attributes to POST
|
174
|
+
def remove_supporting_work_for_goal(client, options: {}, **data)
|
175
|
+
path = "/goals/{goal_gid}/removeSupportingWork"
|
176
|
+
parse(client.post(path, body: data, options: options)).first
|
177
|
+
end
|
178
|
+
|
179
|
+
# Get supporting work from a goal
|
180
|
+
#
|
181
|
+
|
182
|
+
# options - [Hash] the request I/O options
|
183
|
+
# > 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
|
+
# > 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: {})
|
186
|
+
path = "/goals/{goal_gid}/supportingWork"
|
187
|
+
Collection.new(parse(client.get(path, options: options)), type: Project, client: client)
|
188
|
+
end
|
189
|
+
|
190
|
+
# Update a goal
|
191
|
+
#
|
192
|
+
# goal_gid - [str] (required) Globally unique identifier for the goal.
|
193
|
+
# options - [Hash] the request I/O options
|
194
|
+
# > 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.
|
195
|
+
# > 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.
|
196
|
+
# data - [Hash] the attributes to PUT
|
197
|
+
def update_goal(client, goal_gid: required("goal_gid"), options: {}, **data)
|
198
|
+
path = "/goals/{goal_gid}"
|
199
|
+
path["{goal_gid}"] = goal_gid
|
200
|
+
parse(client.put(path, body: data, options: options)).first
|
201
|
+
end
|
202
|
+
|
203
|
+
# Update a goal metric
|
204
|
+
#
|
205
|
+
|
206
|
+
# options - [Hash] the request I/O options
|
207
|
+
# > 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
|
+
# > 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
|
+
# data - [Hash] the attributes to POST
|
210
|
+
def update_goal_metric(client, options: {}, **data)
|
211
|
+
path = "/goals/{goal_gid}/setMetricCurrentValue"
|
212
|
+
parse(client.post(path, body: data, options: options)).first
|
213
|
+
end
|
214
|
+
|
215
|
+
end
|
216
|
+
end
|
217
|
+
end
|
218
|
+
end
|
@@ -0,0 +1,68 @@
|
|
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 ProjectBriefsBase < Resource
|
9
|
+
|
10
|
+
def self.inherited(base)
|
11
|
+
Registry.register(base)
|
12
|
+
end
|
13
|
+
|
14
|
+
class << self
|
15
|
+
# Create a project brief
|
16
|
+
#
|
17
|
+
# project_gid - [str] (required) Globally unique identifier for the project.
|
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_project_brief(client, project_gid: required("project_gid"), options: {}, **data)
|
23
|
+
path = "/projects/{project_gid}/project_briefs"
|
24
|
+
path["{project_gid}"] = project_gid
|
25
|
+
parse(client.post(path, body: data, options: options)).first
|
26
|
+
end
|
27
|
+
|
28
|
+
# Delete a project brief
|
29
|
+
#
|
30
|
+
# project_brief_gid - [str] (required) Globally unique identifier for the project brief.
|
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_project_brief(client, project_brief_gid: required("project_brief_gid"), options: {})
|
35
|
+
path = "/project_briefs/{project_brief_gid}"
|
36
|
+
path["{project_brief_gid}"] = project_brief_gid
|
37
|
+
parse(client.delete(path, options: options)).first
|
38
|
+
end
|
39
|
+
|
40
|
+
# Get a project brief
|
41
|
+
#
|
42
|
+
# project_brief_gid - [str] (required) Globally unique identifier for the project brief.
|
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
|
+
def get_project_brief(client, project_brief_gid: required("project_brief_gid"), options: {})
|
47
|
+
path = "/project_briefs/{project_brief_gid}"
|
48
|
+
path["{project_brief_gid}"] = project_brief_gid
|
49
|
+
parse(client.get(path, options: options)).first
|
50
|
+
end
|
51
|
+
|
52
|
+
# Update a project brief
|
53
|
+
#
|
54
|
+
# project_brief_gid - [str] (required) Globally unique identifier for the project brief.
|
55
|
+
# options - [Hash] the request I/O options
|
56
|
+
# > 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.
|
57
|
+
# > 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.
|
58
|
+
# data - [Hash] the attributes to PUT
|
59
|
+
def update_project_brief(client, project_brief_gid: required("project_brief_gid"), options: {}, **data)
|
60
|
+
path = "/project_briefs/{project_brief_gid}"
|
61
|
+
path["{project_brief_gid}"] = project_brief_gid
|
62
|
+
parse(client.put(path, body: data, options: options)).first
|
63
|
+
end
|
64
|
+
|
65
|
+
end
|
66
|
+
end
|
67
|
+
end
|
68
|
+
end
|
@@ -0,0 +1,73 @@
|
|
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 ProjectTemplatesBase < Resource
|
9
|
+
|
10
|
+
def self.inherited(base)
|
11
|
+
Registry.register(base)
|
12
|
+
end
|
13
|
+
|
14
|
+
class << self
|
15
|
+
# Get a project template
|
16
|
+
#
|
17
|
+
# project_template_gid - [str] (required) Globally unique identifier for the project template.
|
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
|
+
def get_project_template(client, project_template_gid: required("project_template_gid"), options: {})
|
22
|
+
path = "/project_templates/{project_template_gid}"
|
23
|
+
path["{project_template_gid}"] = project_template_gid
|
24
|
+
parse(client.get(path, options: options)).first
|
25
|
+
end
|
26
|
+
|
27
|
+
# Get multiple project templates
|
28
|
+
#
|
29
|
+
|
30
|
+
# workspace - [str] The workspace to filter results on.
|
31
|
+
# team - [str] The team to filter projects on.
|
32
|
+
# options - [Hash] the request I/O options
|
33
|
+
# > 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.'
|
34
|
+
# > limit - [int] Results per page. The number of objects to return per page. The value must be between 1 and 100.
|
35
|
+
# > 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.
|
36
|
+
# > 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.
|
37
|
+
def get_project_templates(client, workspace: nil, team: nil, options: {})
|
38
|
+
path = "/project_templates"
|
39
|
+
params = { workspace: workspace, team: team }.reject { |_,v| v.nil? || Array(v).empty? }
|
40
|
+
Collection.new(parse(client.get(path, params: params, options: options)), type: Resource, client: client)
|
41
|
+
end
|
42
|
+
|
43
|
+
# Get a team's project templates
|
44
|
+
#
|
45
|
+
# team_gid - [str] (required) Globally unique identifier for the team.
|
46
|
+
# options - [Hash] the request I/O options
|
47
|
+
# > 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.'
|
48
|
+
# > limit - [int] Results per page. The number of objects to return per page. The value must be between 1 and 100.
|
49
|
+
# > 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.
|
50
|
+
# > 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.
|
51
|
+
def get_project_templates_for_team(client, team_gid: required("team_gid"), options: {})
|
52
|
+
path = "/teams/{team_gid}/project_templates"
|
53
|
+
path["{team_gid}"] = team_gid
|
54
|
+
Collection.new(parse(client.get(path, options: options)), type: Resource, client: client)
|
55
|
+
end
|
56
|
+
|
57
|
+
# Instantiate a project from a project template
|
58
|
+
#
|
59
|
+
# project_template_gid - [str] (required) Globally unique identifier for the project template.
|
60
|
+
# options - [Hash] the request I/O options
|
61
|
+
# > 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.
|
62
|
+
# > 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.
|
63
|
+
# data - [Hash] the attributes to POST
|
64
|
+
def instantiate_project(client, project_template_gid: required("project_template_gid"), options: {}, **data)
|
65
|
+
path = "/project_templates/{project_template_gid}/instantiateProject"
|
66
|
+
path["{project_template_gid}"] = project_template_gid
|
67
|
+
Job.new(parse(client.post(path, body: data, options: options)).first, client: client)
|
68
|
+
end
|
69
|
+
|
70
|
+
end
|
71
|
+
end
|
72
|
+
end
|
73
|
+
end
|
@@ -202,6 +202,19 @@ module Asana
|
|
202
202
|
parse(client.get(path, options: options)).first
|
203
203
|
end
|
204
204
|
|
205
|
+
# Create a project template 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_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.
|
210
|
+
# > 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.
|
211
|
+
# data - [Hash] the attributes to POST
|
212
|
+
def project_save_as_template(client, project_gid: required("project_gid"), options: {}, **data)
|
213
|
+
path = "/projects/{project_gid}/saveAsTemplate"
|
214
|
+
path["{project_gid}"] = project_gid
|
215
|
+
Job.new(parse(client.post(path, body: data, options: options)).first, client: client)
|
216
|
+
end
|
217
|
+
|
205
218
|
# Remove a custom field from a project
|
206
219
|
#
|
207
220
|
# project_gid - [str] (required) Globally unique identifier for the project.
|
@@ -0,0 +1,72 @@
|
|
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 StatusUpdatesBase < Resource
|
9
|
+
|
10
|
+
def self.inherited(base)
|
11
|
+
Registry.register(base)
|
12
|
+
end
|
13
|
+
|
14
|
+
class << self
|
15
|
+
# Create a status update
|
16
|
+
#
|
17
|
+
|
18
|
+
# options - [Hash] the request I/O options
|
19
|
+
# > 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.'
|
20
|
+
# > limit - [int] Results per page. The number of objects to return per page. The value must be between 1 and 100.
|
21
|
+
# > 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.
|
22
|
+
# > 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.
|
23
|
+
# data - [Hash] the attributes to POST
|
24
|
+
def create_status_for_object(client, options: {}, **data)
|
25
|
+
path = "/status_updates"
|
26
|
+
parse(client.post(path, body: data, options: options)).first
|
27
|
+
end
|
28
|
+
|
29
|
+
# Delete a status update
|
30
|
+
#
|
31
|
+
# status_gid - [str] (required) The status update to get.
|
32
|
+
# options - [Hash] the request I/O options
|
33
|
+
# > 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.
|
34
|
+
# > 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.
|
35
|
+
def delete_status(client, status_gid: required("status_gid"), options: {})
|
36
|
+
path = "/status_updates/{status_gid}"
|
37
|
+
path["{status_gid}"] = status_gid
|
38
|
+
parse(client.delete(path, options: options)).first
|
39
|
+
end
|
40
|
+
|
41
|
+
# Get a status update
|
42
|
+
#
|
43
|
+
# status_gid - [str] (required) The status update to get.
|
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 get_status(client, status_gid: required("status_gid"), options: {})
|
48
|
+
path = "/status_updates/{status_gid}"
|
49
|
+
path["{status_gid}"] = status_gid
|
50
|
+
parse(client.get(path, options: options)).first
|
51
|
+
end
|
52
|
+
|
53
|
+
# Get status updates from an object
|
54
|
+
#
|
55
|
+
|
56
|
+
# parent - [str] (required) Globally unique identifier for object to fetch statuses from.
|
57
|
+
# created_since - [datetime] Only return statuses that have been created since the given time.
|
58
|
+
# options - [Hash] the request I/O options
|
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.'
|
60
|
+
# > limit - [int] Results per page. The number of objects to return per page. The value must be between 1 and 100.
|
61
|
+
# > 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.
|
62
|
+
# > 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.
|
63
|
+
def get_statuses_for_object(client, parent: nil, created_since: nil, options: {})
|
64
|
+
path = "/status_updates"
|
65
|
+
params = { parent: parent, created_since: created_since }.reject { |_,v| v.nil? || Array(v).empty? }
|
66
|
+
Collection.new(parse(client.get(path, params: params, options: options)), type: Resource, client: client)
|
67
|
+
end
|
68
|
+
|
69
|
+
end
|
70
|
+
end
|
71
|
+
end
|
72
|
+
end
|
@@ -331,7 +331,6 @@ module Asana
|
|
331
331
|
# resource_subtype - [str] Filters results by the task's resource_subtype
|
332
332
|
# assignee_any - [str] Comma-separated list of user identifiers
|
333
333
|
# assignee_not - [str] Comma-separated list of user identifiers
|
334
|
-
# assignee_status - [str] One of `inbox`, `today`, `upcoming`, or `later`
|
335
334
|
# portfolios_any - [str] Comma-separated list of portfolio IDs
|
336
335
|
# projects_any - [str] Comma-separated list of project IDs
|
337
336
|
# projects_not - [str] Comma-separated list of project IDs
|
@@ -343,15 +342,12 @@ module Asana
|
|
343
342
|
# tags_not - [str] Comma-separated list of tag IDs
|
344
343
|
# tags_all - [str] Comma-separated list of tag IDs
|
345
344
|
# teams_any - [str] Comma-separated list of team IDs
|
346
|
-
# followers_any - [str] Comma-separated list of user identifiers
|
347
345
|
# followers_not - [str] Comma-separated list of user identifiers
|
348
346
|
# created_by_any - [str] Comma-separated list of user identifiers
|
349
347
|
# created_by_not - [str] Comma-separated list of user identifiers
|
350
348
|
# assigned_by_any - [str] Comma-separated list of user identifiers
|
351
349
|
# assigned_by_not - [str] Comma-separated list of user identifiers
|
352
|
-
# liked_by_any - [str] Comma-separated list of user identifiers
|
353
350
|
# liked_by_not - [str] Comma-separated list of user identifiers
|
354
|
-
# commented_on_by_any - [str] Comma-separated list of user identifiers
|
355
351
|
# commented_on_by_not - [str] Comma-separated list of user identifiers
|
356
352
|
# due_on_before - [date] ISO 8601 date string
|
357
353
|
# due_on_after - [date] ISO 8601 date string
|
@@ -386,10 +382,10 @@ module Asana
|
|
386
382
|
# options - [Hash] the request I/O options
|
387
383
|
# > 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.
|
388
384
|
# > 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.
|
389
|
-
def search_tasks_for_workspace(client, workspace_gid: required("workspace_gid"), text: nil, resource_subtype: nil, assignee_any: nil, assignee_not: nil,
|
385
|
+
def search_tasks_for_workspace(client, workspace_gid: required("workspace_gid"), text: nil, resource_subtype: nil, assignee_any: nil, assignee_not: nil, portfolios_any: nil, projects_any: nil, projects_not: nil, projects_all: nil, sections_any: nil, sections_not: nil, sections_all: nil, tags_any: nil, tags_not: nil, tags_all: nil, teams_any: nil, followers_not: nil, created_by_any: nil, created_by_not: nil, assigned_by_any: nil, assigned_by_not: nil, liked_by_not: nil, commented_on_by_not: nil, due_on_before: nil, due_on_after: nil, due_on: nil, due_at_before: nil, due_at_after: nil, start_on_before: nil, start_on_after: nil, start_on: nil, created_on_before: nil, created_on_after: nil, created_on: nil, created_at_before: nil, created_at_after: nil, completed_on_before: nil, completed_on_after: nil, completed_on: nil, completed_at_before: nil, completed_at_after: nil, modified_on_before: nil, modified_on_after: nil, modified_on: nil, modified_at_before: nil, modified_at_after: nil, is_blocking: nil, is_blocked: nil, has_attachment: nil, completed: nil, is_subtask: nil, sort_by: nil, sort_ascending: nil, options: {})
|
390
386
|
path = "/workspaces/{workspace_gid}/tasks/search"
|
391
387
|
path["{workspace_gid}"] = workspace_gid
|
392
|
-
params = { text: text, resource_subtype: resource_subtype, "assignee.any": assignee_any, "assignee.not": assignee_not,
|
388
|
+
params = { text: text, resource_subtype: resource_subtype, "assignee.any": assignee_any, "assignee.not": assignee_not, "portfolios.any": portfolios_any, "projects.any": projects_any, "projects.not": projects_not, "projects.all": projects_all, "sections.any": sections_any, "sections.not": sections_not, "sections.all": sections_all, "tags.any": tags_any, "tags.not": tags_not, "tags.all": tags_all, "teams.any": teams_any, "followers.not": followers_not, "created_by.any": created_by_any, "created_by.not": created_by_not, "assigned_by.any": assigned_by_any, "assigned_by.not": assigned_by_not, "liked_by.not": liked_by_not, "commented_on_by.not": commented_on_by_not, due_on_before: due_on_before, due_on_after: due_on_after, due_on: due_on, due_at_before: due_at_before, due_at_after: due_at_after, start_on_before: start_on_before, start_on_after: start_on_after, start_on: start_on, created_on_before: created_on_before, created_on_after: created_on_after, created_on: created_on, created_at_before: created_at_before, created_at_after: created_at_after, completed_on_before: completed_on_before, completed_on_after: completed_on_after, completed_on: completed_on, completed_at_before: completed_at_before, completed_at_after: completed_at_after, modified_on_before: modified_on_before, modified_on_after: modified_on_after, modified_on: modified_on, modified_at_before: modified_at_before, modified_at_after: modified_at_after, is_blocking: is_blocking, is_blocked: is_blocked, has_attachment: has_attachment, completed: completed, is_subtask: is_subtask, sort_by: sort_by, sort_ascending: sort_ascending }.reject { |_,v| v.nil? || Array(v).empty? }
|
393
389
|
Collection.new(parse(client.get(path, params: params, options: options)), type: Task, client: client)
|
394
390
|
end
|
395
391
|
|
@@ -22,7 +22,21 @@ module Asana
|
|
22
22
|
def add_user_for_team(client, team_gid: required("team_gid"), options: {}, **data)
|
23
23
|
path = "/teams/{team_gid}/addUser"
|
24
24
|
path["{team_gid}"] = team_gid
|
25
|
-
|
25
|
+
parse(client.post(path, body: data, options: options)).first
|
26
|
+
end
|
27
|
+
|
28
|
+
# Create a team
|
29
|
+
#
|
30
|
+
|
31
|
+
# options - [Hash] the request I/O options
|
32
|
+
# > 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.'
|
33
|
+
# > limit - [int] Results per page. The number of objects to return per page. The value must be between 1 and 100.
|
34
|
+
# > 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.
|
35
|
+
# > 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.
|
36
|
+
# data - [Hash] the attributes to POST
|
37
|
+
def create_team(client, options: {}, **data)
|
38
|
+
path = "/teams"
|
39
|
+
Team.new(parse(client.post(path, body: data, options: options)).first, client: client)
|
26
40
|
end
|
27
41
|
|
28
42
|
# Get a team
|
@@ -0,0 +1,47 @@
|
|
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 TimePeriodsBase < Resource
|
9
|
+
|
10
|
+
def self.inherited(base)
|
11
|
+
Registry.register(base)
|
12
|
+
end
|
13
|
+
|
14
|
+
class << self
|
15
|
+
# Get a time period
|
16
|
+
#
|
17
|
+
# time_period_gid - [str] (required) Globally unique identifier for the time period.
|
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
|
+
def get_time_period(client, time_period_gid: required("time_period_gid"), options: {})
|
22
|
+
path = "/time_periods/{time_period_gid}"
|
23
|
+
path["{time_period_gid}"] = time_period_gid
|
24
|
+
parse(client.get(path, options: options)).first
|
25
|
+
end
|
26
|
+
|
27
|
+
# Get time periods
|
28
|
+
#
|
29
|
+
|
30
|
+
# start_on - [date] ISO 8601 date string
|
31
|
+
# end_on - [date] ISO 8601 date string
|
32
|
+
# workspace - [str] (required) Globally unique identifier for the workspace.
|
33
|
+
# options - [Hash] the request I/O options
|
34
|
+
# > 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.'
|
35
|
+
# > limit - [int] Results per page. The number of objects to return per page. The value must be between 1 and 100.
|
36
|
+
# > 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.
|
37
|
+
# > 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.
|
38
|
+
def get_time_periods(client, start_on: nil, end_on: nil, workspace: nil, options: {})
|
39
|
+
path = "/time_periods"
|
40
|
+
params = { start_on: start_on, end_on: end_on, workspace: workspace }.reject { |_,v| v.nil? || Array(v).empty? }
|
41
|
+
Collection.new(parse(client.get(path, params: params, options: options)), type: Resource, client: client)
|
42
|
+
end
|
43
|
+
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
@@ -15,7 +15,7 @@ module Asana
|
|
15
15
|
# Get objects via typeahead
|
16
16
|
#
|
17
17
|
# workspace_gid - [str] (required) Globally unique identifier for the workspace or organization.
|
18
|
-
# resource_type - [str] (required) The type of values the typeahead should return. You can choose from one of the following: `custom_field`, `project`, `portfolio`, `tag`, `task`, and `user`. Note that unlike in the names of endpoints, the types listed here are in singular form (e.g. `task`). Using multiple types is not yet supported.
|
18
|
+
# resource_type - [str] (required) The type of values the typeahead should return. You can choose from one of the following: `custom_field`, `project`, `project_template`, `portfolio`, `tag`, `task`, and `user`. Note that unlike in the names of endpoints, the types listed here are in singular form (e.g. `task`). Using multiple types is not yet supported.
|
19
19
|
# type - [str] *Deprecated: new integrations should prefer the resource_type field.*
|
20
20
|
# query - [str] The string that will be used to search for relevant objects. If an empty string is passed in, the API will currently return an empty result set.
|
21
21
|
# count - [int] The number of results to return. The default is 20 if this parameter is omitted, with a minimum of 1 and a maximum of 100. If there are fewer results found than requested, all will be returned.
|