asana 1.0.0 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0a4e97c4ca97737835acf2af6cc261b767770ee3a16743e88aabe1bd86e81173
4
- data.tar.gz: 5794d53e835b7c06820d0c0487820486c8a88338c4037302159560e4ea1c0cce
3
+ metadata.gz: 79c29d830033169faeef65fea64f81703176051201c2047cb951f9456471baa6
4
+ data.tar.gz: fe391a1e882fe5291437eb9f2052b887c888b8e259f3182cf35d2ddf2ffc72c8
5
5
  SHA512:
6
- metadata.gz: 37629874aeb92b99355aa0074aa010f8d7d98ebe208530c7d02e875676f291f733a915e7c972e0780e4f6f535d438c59f08f5df7b5bcc5296d5ead283ffff4d1
7
- data.tar.gz: bbdbf4440eb4b10214e97a0db1e88ae8ac7eaa930d8c634efe4e7d63e71a66f0588f1fa4c3ce439b7647bae9d8eba61d17314a3dde2579005b5c7b2e125ddc17
6
+ metadata.gz: 789b9cd1fb242c9c07496f2fc4123de1c6e1218ead39952ff1965526ed0bf3910f4f392bbead235f4ba1a1df17b1af09410d89dfb92d96077ebadcb9919615f1
7
+ data.tar.gz: bb90c3775c43110ce691e19d594cb696f477d10012e7c693318a7d9f1a04365c527fce606668948cf9ead376bdb098ee010c62aae55843d785a43759dd6b0785
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- asana (1.0.0)
4
+ asana (2.0.0)
5
5
  faraday (~> 1.0)
6
6
  faraday_middleware (~> 1.0)
7
7
  faraday_middleware-multi_json (~> 0.0)
@@ -19,7 +19,7 @@ GEM
19
19
  coderay (1.1.3)
20
20
  diff-lcs (1.5.0)
21
21
  docile (1.4.0)
22
- faraday (1.10.0)
22
+ faraday (1.10.2)
23
23
  faraday-em_http (~> 1.0)
24
24
  faraday-em_synchrony (~> 1.0)
25
25
  faraday-excon (~> 1.1)
@@ -70,7 +70,7 @@ GEM
70
70
  guard (>= 1.1.0)
71
71
  yard (>= 0.7.0)
72
72
  hashie (5.0.0)
73
- jwt (2.4.1)
73
+ jwt (2.5.0)
74
74
  listen (3.7.1)
75
75
  rb-fsevent (~> 0.10, >= 0.10.3)
76
76
  rb-inotify (~> 0.9, >= 0.9.10)
@@ -83,13 +83,13 @@ GEM
83
83
  notiffany (0.1.3)
84
84
  nenv (~> 0.1)
85
85
  shellany (~> 0.0)
86
- oauth2 (2.0.3)
86
+ oauth2 (2.0.8)
87
87
  faraday (>= 0.17.3, < 3.0)
88
88
  jwt (>= 1.0, < 3.0)
89
89
  multi_xml (~> 0.5)
90
90
  rack (>= 1.2, < 3)
91
- rash_alt (>= 0.4, < 1)
92
- version_gem (~> 1.0)
91
+ snaky_hash (~> 2.0)
92
+ version_gem (~> 1.1)
93
93
  parallel (1.22.1)
94
94
  parser (2.7.2.0)
95
95
  ast (~> 2.4.1)
@@ -97,14 +97,12 @@ GEM
97
97
  pry (0.14.1)
98
98
  coderay (~> 1.1)
99
99
  method_source (~> 1.0)
100
- rack (2.2.3.1)
100
+ rack (2.2.4)
101
101
  rack-protection (1.5.5)
102
102
  rack
103
103
  rainbow (3.1.1)
104
104
  rake (13.0.6)
105
- rash_alt (0.4.12)
106
- hashie (>= 3.4)
107
- rb-fsevent (0.11.1)
105
+ rb-fsevent (0.11.2)
108
106
  rb-inotify (0.10.1)
109
107
  ffi (~> 1.0)
110
108
  rspec (3.11.0)
@@ -138,6 +136,9 @@ GEM
138
136
  simplecov_json_formatter (~> 0.1)
139
137
  simplecov-html (0.12.3)
140
138
  simplecov_json_formatter (0.1.4)
139
+ snaky_hash (2.0.0)
140
+ hashie
141
+ version_gem (~> 1.1)
141
142
  thor (1.2.1)
142
143
  tomparse (0.4.2)
143
144
  unicode-display_width (1.8.0)
@@ -161,6 +162,7 @@ DEPENDENCIES
161
162
  guard-rspec
162
163
  guard-rubocop
163
164
  guard-yard
165
+ oauth2 (~> 2.0.3)
164
166
  rack-protection (= 1.5.5)
165
167
  rake (~> 13.0)
166
168
  rspec (~> 3.2)
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.0
1
+ 2.0.0
@@ -39,7 +39,7 @@ module Asana
39
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
+ # parent - [str] (required) Globally unique identifier for object to fetch statuses from. Must be a GID for a task, project, or project_brief.
43
43
  # options - [Hash] the request I/O options
44
44
  # > offset - [str] Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. 'Note: You can only pass in an offset that was returned to you via a previously paginated request.'
45
45
  # > limit - [int] Results per page. The number of objects to return per page. The value must be between 1 and 100.
@@ -0,0 +1,83 @@
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 GoalRelationshipsBase < Resource
9
+
10
+ def self.inherited(base)
11
+ Registry.register(base)
12
+ end
13
+
14
+ class << self
15
+ # Add a supporting goal relationship
16
+ #
17
+ # goal_gid - [str] (required) Globally unique identifier for the goal.
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_supporting_relationship(client, goal_gid: required("goal_gid"), options: {}, **data)
23
+ path = "/goals/{goal_gid}/addSupportingRelationship"
24
+ path["{goal_gid}"] = goal_gid
25
+ parse(client.post(path, body: data, options: options)).first
26
+ end
27
+
28
+ # Get a goal relationship
29
+ #
30
+ # goal_relationship_gid - [str] (required) Globally unique identifier for the goal relationship.
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 get_goal_relationship(client, goal_relationship_gid: required("goal_relationship_gid"), options: {})
35
+ path = "/goal_relationships/{goal_relationship_gid}"
36
+ path["{goal_relationship_gid}"] = goal_relationship_gid
37
+ parse(client.get(path, options: options)).first
38
+ end
39
+
40
+ # Get goal relationships
41
+ #
42
+
43
+ # supported_goal - [str] (required) Globally unique identifier for the supported goal in the goal relationship.
44
+ # resource_subtype - [str] If provided, filter to goal relationships with a given resource_subtype.
45
+ # options - [Hash] the request I/O options
46
+ # > opt_fields - [list[str]] Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
47
+ # > opt_pretty - [bool] Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
48
+ def get_goal_relationships(client, supported_goal: nil, resource_subtype: nil, options: {})
49
+ path = "/goal_relationships"
50
+ params = { supported_goal: supported_goal, resource_subtype: resource_subtype }.reject { |_,v| v.nil? || Array(v).empty? }
51
+ Collection.new(parse(client.get(path, params: params, options: options)), type: Resource, client: client)
52
+ end
53
+
54
+ # Removes a supporting goal relationship
55
+ #
56
+ # goal_gid - [str] (required) Globally unique identifier for the goal.
57
+ # options - [Hash] the request I/O options
58
+ # > 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.
59
+ # > 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.
60
+ # data - [Hash] the attributes to POST
61
+ def remove_supporting_relationship(client, goal_gid: required("goal_gid"), options: {}, **data)
62
+ path = "/goals/{goal_gid}/removeSupportingRelationship"
63
+ path["{goal_gid}"] = goal_gid
64
+ parse(client.post(path, body: data, options: options)).first
65
+ end
66
+
67
+ # Update a goal relationship
68
+ #
69
+ # goal_relationship_gid - [str] (required) Globally unique identifier for the goal relationship.
70
+ # options - [Hash] the request I/O options
71
+ # > opt_fields - [list[str]] Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
72
+ # > opt_pretty - [bool] Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
73
+ # data - [Hash] the attributes to PUT
74
+ def update_goal_relationship(client, goal_relationship_gid: required("goal_relationship_gid"), options: {}, **data)
75
+ path = "/goal_relationships/{goal_relationship_gid}"
76
+ path["{goal_relationship_gid}"] = goal_relationship_gid
77
+ parse(client.put(path, body: data, options: options)).first
78
+ end
79
+
80
+ end
81
+ end
82
+ end
83
+ end
@@ -25,32 +25,6 @@ module Asana
25
25
  parse(client.post(path, body: data, options: options)).first
26
26
  end
27
27
 
28
- # Add a subgoal to a parent goal
29
- #
30
- # goal_gid - [str] (required) Globally unique identifier for the goal.
31
- # options - [Hash] the request I/O options
32
- # > opt_fields - [list[str]] Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
33
- # > opt_pretty - [bool] Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
34
- # data - [Hash] the attributes to POST
35
- def add_subgoal(client, goal_gid: required("goal_gid"), options: {}, **data)
36
- path = "/goals/{goal_gid}/addSubgoal"
37
- path["{goal_gid}"] = goal_gid
38
- parse(client.post(path, body: data, options: options)).first
39
- end
40
-
41
- # Add a project/portfolio as supporting work for a goal.
42
- #
43
- # goal_gid - [str] (required) Globally unique identifier for the goal.
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
- # data - [Hash] the attributes to POST
48
- def add_supporting_work_for_goal(client, goal_gid: required("goal_gid"), options: {}, **data)
49
- path = "/goals/{goal_gid}/addSupportingWork"
50
- path["{goal_gid}"] = goal_gid
51
- parse(client.post(path, body: data, options: options)).first
52
- end
53
-
54
28
  # Create a goal
55
29
  #
56
30
 
@@ -134,18 +108,6 @@ module Asana
134
108
  Collection.new(parse(client.get(path, options: options)), type: Resource, client: client)
135
109
  end
136
110
 
137
- # Get subgoals from a goal
138
- #
139
- # goal_gid - [str] (required) Globally unique identifier for the goal.
140
- # options - [Hash] the request I/O options
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.
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.
143
- def get_subgoals_for_goal(client, goal_gid: required("goal_gid"), options: {})
144
- path = "/goals/{goal_gid}/subgoals"
145
- path["{goal_gid}"] = goal_gid
146
- Collection.new(parse(client.get(path, options: options)), type: Resource, client: client)
147
- end
148
-
149
111
  # Remove a collaborator from a goal
150
112
  #
151
113
  # goal_gid - [str] (required) Globally unique identifier for the goal.
@@ -159,44 +121,6 @@ module Asana
159
121
  parse(client.post(path, body: data, options: options)).first
160
122
  end
161
123
 
162
- # Remove a subgoal from a goal
163
- #
164
- # goal_gid - [str] (required) Globally unique identifier for the goal.
165
- # options - [Hash] the request I/O options
166
- # > opt_fields - [list[str]] Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
167
- # > opt_pretty - [bool] Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
168
- # data - [Hash] the attributes to POST
169
- def remove_subgoal(client, goal_gid: required("goal_gid"), options: {}, **data)
170
- path = "/goals/{goal_gid}/removeSubgoal"
171
- path["{goal_gid}"] = goal_gid
172
- parse(client.post(path, body: data, options: options)).first
173
- end
174
-
175
- # Remove a project/portfolio as supporting work for a goal.
176
- #
177
- # goal_gid - [str] (required) Globally unique identifier for the goal.
178
- # options - [Hash] the request I/O options
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.
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.
181
- # data - [Hash] the attributes to POST
182
- def remove_supporting_work_for_goal(client, goal_gid: required("goal_gid"), options: {}, **data)
183
- path = "/goals/{goal_gid}/removeSupportingWork"
184
- path["{goal_gid}"] = goal_gid
185
- parse(client.post(path, body: data, options: options)).first
186
- end
187
-
188
- # Get supporting work from a goal
189
- #
190
- # goal_gid - [str] (required) Globally unique identifier for the goal.
191
- # options - [Hash] the request I/O options
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.
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.
194
- def supporting_work(client, goal_gid: required("goal_gid"), options: {})
195
- path = "/goals/{goal_gid}/supportingWork"
196
- path["{goal_gid}"] = goal_gid
197
- Collection.new(parse(client.get(path, options: options)), type: Project, client: client)
198
- end
199
-
200
124
  # Update a goal
201
125
  #
202
126
  # goal_gid - [str] (required) Globally unique identifier for the goal.
@@ -21,7 +21,7 @@ module Asana
21
21
  def add_custom_field_setting_for_portfolio(client, portfolio_gid: required("portfolio_gid"), options: {}, **data)
22
22
  path = "/portfolios/{portfolio_gid}/addCustomFieldSetting"
23
23
  path["{portfolio_gid}"] = portfolio_gid
24
- parse(client.post(path, body: data, options: options)).first
24
+ CustomFieldSetting.new(parse(client.post(path, body: data, options: options)).first, client: client)
25
25
  end
26
26
 
27
27
  # Add a portfolio item
@@ -47,7 +47,7 @@ module Asana
47
47
  def add_members_for_portfolio(client, portfolio_gid: required("portfolio_gid"), options: {}, **data)
48
48
  path = "/portfolios/{portfolio_gid}/addMembers"
49
49
  path["{portfolio_gid}"] = portfolio_gid
50
- parse(client.post(path, body: data, options: options)).first
50
+ Portfolio.new(parse(client.post(path, body: data, options: options)).first, client: client)
51
51
  end
52
52
 
53
53
  # Create a portfolio
@@ -151,7 +151,7 @@ module Asana
151
151
  def remove_members_for_portfolio(client, portfolio_gid: required("portfolio_gid"), options: {}, **data)
152
152
  path = "/portfolios/{portfolio_gid}/removeMembers"
153
153
  path["{portfolio_gid}"] = portfolio_gid
154
- parse(client.post(path, body: data, options: options)).first
154
+ Portfolio.new(parse(client.post(path, body: data, options: options)).first, client: client)
155
155
  end
156
156
 
157
157
  # Update a portfolio
@@ -34,7 +34,7 @@ module Asana
34
34
  def add_followers_for_project(client, project_gid: required("project_gid"), options: {}, **data)
35
35
  path = "/projects/{project_gid}/addFollowers"
36
36
  path["{project_gid}"] = project_gid
37
- parse(client.post(path, body: data, options: options)).first
37
+ Project.new(parse(client.post(path, body: data, options: options)).first, client: client)
38
38
  end
39
39
 
40
40
  # Add users to a project
@@ -47,7 +47,7 @@ module Asana
47
47
  def add_members_for_project(client, project_gid: required("project_gid"), options: {}, **data)
48
48
  path = "/projects/{project_gid}/addMembers"
49
49
  path["{project_gid}"] = project_gid
50
- parse(client.post(path, body: data, options: options)).first
50
+ Project.new(parse(client.post(path, body: data, options: options)).first, client: client)
51
51
  end
52
52
 
53
53
  # Create a project
@@ -237,7 +237,7 @@ module Asana
237
237
  def remove_followers_for_project(client, project_gid: required("project_gid"), options: {}, **data)
238
238
  path = "/projects/{project_gid}/removeFollowers"
239
239
  path["{project_gid}"] = project_gid
240
- parse(client.post(path, body: data, options: options)).first
240
+ Project.new(parse(client.post(path, body: data, options: options)).first, client: client)
241
241
  end
242
242
 
243
243
  # Remove users from a project
@@ -250,7 +250,7 @@ module Asana
250
250
  def remove_members_for_project(client, project_gid: required("project_gid"), options: {}, **data)
251
251
  path = "/projects/{project_gid}/removeMembers"
252
252
  path["{project_gid}"] = project_gid
253
- parse(client.post(path, body: data, options: options)).first
253
+ Project.new(parse(client.post(path, body: data, options: options)).first, client: client)
254
254
  end
255
255
 
256
256
  # Update a project
@@ -35,7 +35,7 @@ module Asana
35
35
  def add_dependents_for_task(client, task_gid: required("task_gid"), options: {}, **data)
36
36
  path = "/tasks/{task_gid}/addDependents"
37
37
  path["{task_gid}"] = task_gid
38
- Collection.new(parse(client.post(path, body: data, options: options)), type: Task, client: client)
38
+ parse(client.post(path, body: data, options: options)).first
39
39
  end
40
40
 
41
41
  # Add followers to a task
@@ -48,7 +48,7 @@ module Asana
48
48
  def add_followers_for_task(client, task_gid: required("task_gid"), options: {}, **data)
49
49
  path = "/tasks/{task_gid}/addFollowers"
50
50
  path["{task_gid}"] = task_gid
51
- parse(client.post(path, body: data, options: options)).first
51
+ Task.new(parse(client.post(path, body: data, options: options)).first, client: client)
52
52
  end
53
53
 
54
54
  # Add a project to a task
@@ -271,7 +271,7 @@ module Asana
271
271
  def remove_dependencies_for_task(client, task_gid: required("task_gid"), options: {}, **data)
272
272
  path = "/tasks/{task_gid}/removeDependencies"
273
273
  path["{task_gid}"] = task_gid
274
- Collection.new(parse(client.post(path, body: data, options: options)), type: Resource, client: client)
274
+ parse(client.post(path, body: data, options: options)).first
275
275
  end
276
276
 
277
277
  # Unlink dependents from a task
@@ -284,7 +284,7 @@ module Asana
284
284
  def remove_dependents_for_task(client, task_gid: required("task_gid"), options: {}, **data)
285
285
  path = "/tasks/{task_gid}/removeDependents"
286
286
  path["{task_gid}"] = task_gid
287
- Collection.new(parse(client.post(path, body: data, options: options)), type: Resource, client: client)
287
+ parse(client.post(path, body: data, options: options)).first
288
288
  end
289
289
 
290
290
  # Remove followers from a task
@@ -297,7 +297,7 @@ module Asana
297
297
  def remove_follower_for_task(client, task_gid: required("task_gid"), options: {}, **data)
298
298
  path = "/tasks/{task_gid}/removeFollowers"
299
299
  path["{task_gid}"] = task_gid
300
- parse(client.post(path, body: data, options: options)).first
300
+ Task.new(parse(client.post(path, body: data, options: options)).first, client: client)
301
301
  end
302
302
 
303
303
  # Remove a project from a task
@@ -96,6 +96,20 @@ module Asana
96
96
  parse(client.post(path, body: data, options: options)).first
97
97
  end
98
98
 
99
+ # Update a team
100
+ #
101
+
102
+ # options - [Hash] the request I/O options
103
+ # > 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.'
104
+ # > limit - [int] Results per page. The number of objects to return per page. The value must be between 1 and 100.
105
+ # > 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.
106
+ # > 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.
107
+ # data - [Hash] the attributes to PUT
108
+ def update_team(client, options: {}, **data)
109
+ path = "/teams"
110
+ Team.new(parse(client.put(path, body: data, options: options)).first, client: client)
111
+ end
112
+
99
113
  end
100
114
  end
101
115
  end
@@ -17,7 +17,7 @@ module Asana
17
17
  # workspace_gid - [str] (required) Globally unique identifier for the workspace or organization.
18
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
- # 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.
20
+ # query - [str] The string that will be used to search for relevant objects. If an empty string is passed in, the API will return results.
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.
22
22
  # options - [Hash] the request I/O options
23
23
  # > 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.
data/lib/asana/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  #:nodoc:
2
2
  module Asana
3
3
  # Public: Version of the gem.
4
- VERSION = '1.0.0'
4
+ VERSION = '2.0.0'
5
5
  end
@@ -1,5 +1,5 @@
1
1
  attachments:
2
- create_attachment_for_task: >-
2
+ create_attachment_for_object: >-
3
3
  require 'asana'
4
4
 
5
5
 
@@ -8,7 +8,7 @@ attachments:
8
8
  end
9
9
 
10
10
 
11
- result = client.attachments.create_attachment_for_task(field: "value", field: "value", options: {pretty: true})
11
+ result = client.attachments.create_attachment_for_object(field: "value", field: "value", options: {pretty: true})
12
12
  delete_attachment: >-
13
13
  require 'asana'
14
14
 
@@ -0,0 +1,51 @@
1
+ goalrelationships:
2
+ add_supporting_relationship: >-
3
+ require 'asana'
4
+
5
+
6
+ client = Asana::Client.new do |c|
7
+ c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
8
+ end
9
+
10
+
11
+ result = client.goal_relationships.add_supporting_relationship(goal_gid: 'goal_gid', field: "value", field: "value", options: {pretty: true})
12
+ get_goal_relationship: >-
13
+ require 'asana'
14
+
15
+
16
+ client = Asana::Client.new do |c|
17
+ c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
18
+ end
19
+
20
+
21
+ result = client.goal_relationships.get_goal_relationship(goal_relationship_gid: 'goal_relationship_gid', param: "value", param: "value", options: {pretty: true})
22
+ get_goal_relationships: >-
23
+ require 'asana'
24
+
25
+
26
+ client = Asana::Client.new do |c|
27
+ c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
28
+ end
29
+
30
+
31
+ result = client.goal_relationships.get_goal_relationships(supported_goal: '&#x27;supported_goal_example&#x27;', param: "value", param: "value", options: {pretty: true})
32
+ remove_supporting_relationship: >-
33
+ require 'asana'
34
+
35
+
36
+ client = Asana::Client.new do |c|
37
+ c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
38
+ end
39
+
40
+
41
+ result = client.goal_relationships.remove_supporting_relationship(goal_gid: 'goal_gid', field: "value", field: "value", options: {pretty: true})
42
+ update_goal_relationship: >-
43
+ require 'asana'
44
+
45
+
46
+ client = Asana::Client.new do |c|
47
+ c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
48
+ end
49
+
50
+
51
+ result = client.goal_relationships.update_goal_relationship(goal_relationship_gid: 'goal_relationship_gid', field: "value", field: "value", options: {pretty: true})
@@ -9,26 +9,6 @@ goals:
9
9
 
10
10
 
11
11
  result = client.goals.add_followers(goal_gid: 'goal_gid', field: "value", field: "value", options: {pretty: true})
12
- add_subgoal: >-
13
- require 'asana'
14
-
15
-
16
- client = Asana::Client.new do |c|
17
- c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
18
- end
19
-
20
-
21
- result = client.goals.add_subgoal(goal_gid: 'goal_gid', field: "value", field: "value", options: {pretty: true})
22
- add_supporting_work_for_goal: >-
23
- require 'asana'
24
-
25
-
26
- client = Asana::Client.new do |c|
27
- c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
28
- end
29
-
30
-
31
- result = client.goals.add_supporting_work_for_goal(goal_gid: 'goal_gid', field: "value", field: "value", options: {pretty: true})
32
12
  create_goal: >-
33
13
  require 'asana'
34
14
 
@@ -89,16 +69,6 @@ goals:
89
69
 
90
70
 
91
71
  result = client.goals.get_parent_goals_for_goal(goal_gid: 'goal_gid', param: "value", param: "value", options: {pretty: true})
92
- get_subgoals_for_goal: >-
93
- require 'asana'
94
-
95
-
96
- client = Asana::Client.new do |c|
97
- c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
98
- end
99
-
100
-
101
- result = client.goals.get_subgoals_for_goal(goal_gid: 'goal_gid', param: "value", param: "value", options: {pretty: true})
102
72
  remove_followers: >-
103
73
  require 'asana'
104
74
 
@@ -109,36 +79,6 @@ goals:
109
79
 
110
80
 
111
81
  result = client.goals.remove_followers(goal_gid: 'goal_gid', field: "value", field: "value", options: {pretty: true})
112
- remove_subgoal: >-
113
- require 'asana'
114
-
115
-
116
- client = Asana::Client.new do |c|
117
- c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
118
- end
119
-
120
-
121
- result = client.goals.remove_subgoal(goal_gid: 'goal_gid', field: "value", field: "value", options: {pretty: true})
122
- remove_supporting_work_for_goal: >-
123
- require 'asana'
124
-
125
-
126
- client = Asana::Client.new do |c|
127
- c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
128
- end
129
-
130
-
131
- result = client.goals.remove_supporting_work_for_goal(goal_gid: 'goal_gid', field: "value", field: "value", options: {pretty: true})
132
- supporting_work: >-
133
- require 'asana'
134
-
135
-
136
- client = Asana::Client.new do |c|
137
- c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
138
- end
139
-
140
-
141
- result = client.goals.supporting_work(goal_gid: 'goal_gid', param: "value", param: "value", options: {pretty: true})
142
82
  update_goal: >-
143
83
  require 'asana'
144
84
 
@@ -59,3 +59,13 @@ teams:
59
59
 
60
60
 
61
61
  result = client.teams.remove_user_for_team(team_gid: 'team_gid', field: "value", field: "value", options: {pretty: true})
62
+ update_team: >-
63
+ require 'asana'
64
+
65
+
66
+ client = Asana::Client.new do |c|
67
+ c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
68
+ end
69
+
70
+
71
+ result = client.teams.update_team(field: "value", field: "value", options: {pretty: true})
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: 1.0.0
4
+ version: 2.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-30 00:00:00.000000000 Z
11
+ date: 2022-09-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: oauth2
@@ -188,6 +188,7 @@ files:
188
188
  - lib/asana/resources/gen/custom_field_settings_base.rb
189
189
  - lib/asana/resources/gen/custom_fields_base.rb
190
190
  - lib/asana/resources/gen/events_base.rb
191
+ - lib/asana/resources/gen/goal_relationships_base.rb
191
192
  - lib/asana/resources/gen/goals_base.rb
192
193
  - lib/asana/resources/gen/jobs_base.rb
193
194
  - lib/asana/resources/gen/organization_exports_base.rb
@@ -243,6 +244,7 @@ files:
243
244
  - samples/custom_field_settings_sample.yaml
244
245
  - samples/custom_fields_sample.yaml
245
246
  - samples/events_sample.yaml
247
+ - samples/goal_relationships_sample.yaml
246
248
  - samples/goals_sample.yaml
247
249
  - samples/jobs_sample.yaml
248
250
  - samples/organization_exports_sample.yaml