asana 0.10.12 → 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: 86bb26b89d28d3852c328f9d36214265a6cfac22c1713ec082cae415f591e7af
4
- data.tar.gz: 594914fb556e2c71f33c60fa8bfaefc99a4653b82ea3b7676e17242777b9f564
3
+ metadata.gz: 79c29d830033169faeef65fea64f81703176051201c2047cb951f9456471baa6
4
+ data.tar.gz: fe391a1e882fe5291437eb9f2052b887c888b8e259f3182cf35d2ddf2ffc72c8
5
5
  SHA512:
6
- metadata.gz: c062ee26c65570833090931f926d190789dd05ba51c464be76bd63f6152ab9be2413d32f6166503c395c5b4b477e52a7579b923d2df1c4fa2aa88c616dc9f1e3
7
- data.tar.gz: a244bfe6034dc05f35b2b16b4fefe8b745786357f90035d3f9887481389842cd04424c0014aeed4b97df05c2f4ad0470b132b8cd21d4aad0a6b0c774f9f665a2
6
+ metadata.gz: 789b9cd1fb242c9c07496f2fc4123de1c6e1218ead39952ff1965526ed0bf3910f4f392bbead235f4ba1a1df17b1af09410d89dfb92d96077ebadcb9919615f1
7
+ data.tar.gz: bb90c3775c43110ce691e19d594cb696f477d10012e7c693318a7d9f1a04365c527fce606668948cf9ead376bdb098ee010c62aae55843d785a43759dd6b0785
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 2.4.0
1
+ 2.5.0
data/Gemfile.lock CHANGED
@@ -1,11 +1,11 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- asana (0.10.12)
4
+ asana (2.0.0)
5
5
  faraday (~> 1.0)
6
6
  faraday_middleware (~> 1.0)
7
7
  faraday_middleware-multi_json (~> 0.0)
8
- oauth2 (~> 1.4)
8
+ oauth2 (>= 1.4, < 3)
9
9
 
10
10
  GEM
11
11
  remote: https://rubygems.org/
@@ -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)
@@ -69,7 +69,8 @@ GEM
69
69
  guard-yard (2.2.1)
70
70
  guard (>= 1.1.0)
71
71
  yard (>= 0.7.0)
72
- jwt (2.4.1)
72
+ hashie (5.0.0)
73
+ jwt (2.5.0)
73
74
  listen (3.7.1)
74
75
  rb-fsevent (~> 0.10, >= 0.10.3)
75
76
  rb-inotify (~> 0.9, >= 0.9.10)
@@ -82,12 +83,13 @@ GEM
82
83
  notiffany (0.1.3)
83
84
  nenv (~> 0.1)
84
85
  shellany (~> 0.0)
85
- oauth2 (1.4.9)
86
+ oauth2 (2.0.8)
86
87
  faraday (>= 0.17.3, < 3.0)
87
88
  jwt (>= 1.0, < 3.0)
88
- multi_json (~> 1.3)
89
89
  multi_xml (~> 0.5)
90
90
  rack (>= 1.2, < 3)
91
+ snaky_hash (~> 2.0)
92
+ version_gem (~> 1.1)
91
93
  parallel (1.22.1)
92
94
  parser (2.7.2.0)
93
95
  ast (~> 2.4.1)
@@ -95,12 +97,12 @@ GEM
95
97
  pry (0.14.1)
96
98
  coderay (~> 1.1)
97
99
  method_source (~> 1.0)
98
- rack (2.2.3.1)
100
+ rack (2.2.4)
99
101
  rack-protection (1.5.5)
100
102
  rack
101
103
  rainbow (3.1.1)
102
104
  rake (13.0.6)
103
- rb-fsevent (0.11.1)
105
+ rb-fsevent (0.11.2)
104
106
  rb-inotify (0.10.1)
105
107
  ffi (~> 1.0)
106
108
  rspec (3.11.0)
@@ -134,9 +136,13 @@ GEM
134
136
  simplecov_json_formatter (~> 0.1)
135
137
  simplecov-html (0.12.3)
136
138
  simplecov_json_formatter (0.1.4)
139
+ snaky_hash (2.0.0)
140
+ hashie
141
+ version_gem (~> 1.1)
137
142
  thor (1.2.1)
138
143
  tomparse (0.4.2)
139
144
  unicode-display_width (1.8.0)
145
+ version_gem (1.1.0)
140
146
  webrick (1.7.0)
141
147
  yard (0.9.28)
142
148
  webrick (~> 1.7.0)
@@ -156,6 +162,7 @@ DEPENDENCIES
156
162
  guard-rspec
157
163
  guard-rubocop
158
164
  guard-yard
165
+ oauth2 (~> 2.0.3)
159
166
  rack-protection (= 1.5.5)
160
167
  rake (~> 13.0)
161
168
  rspec (~> 3.2)
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.10.12
1
+ 2.0.0
data/asana.gemspec CHANGED
@@ -21,7 +21,7 @@ Gem::Specification.new do |spec|
21
21
 
22
22
  spec.required_ruby_version = '>= 2.5'
23
23
 
24
- spec.add_dependency "oauth2", "~> 1.4"
24
+ spec.add_dependency "oauth2", ">= 1.4", '< 3'
25
25
  spec.add_dependency "faraday", "~> 1.0"
26
26
  spec.add_dependency "faraday_middleware", "~> 1.0"
27
27
  spec.add_dependency "faraday_middleware-multi_json", "~> 0.0"
@@ -36,18 +36,19 @@ module Asana
36
36
  Attachment.new(parse(client.get(path, options: options)).first, client: client)
37
37
  end
38
38
 
39
- # Get attachments for a task
39
+ # Get attachments from an object
40
40
  #
41
- # task_gid - [str] (required) The task to operate on.
41
+
42
+ # parent - [str] (required) Globally unique identifier for object to fetch statuses from. Must be a GID for a task, project, or project_brief.
42
43
  # options - [Hash] the request I/O options
43
44
  # > offset - [str] Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. 'Note: You can only pass in an offset that was returned to you via a previously paginated request.'
44
45
  # > limit - [int] Results per page. The number of objects to return per page. The value must be between 1 and 100.
45
46
  # > opt_fields - [list[str]] Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
46
47
  # > opt_pretty - [bool] Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
47
- def get_attachments_for_task(client, task_gid: required("task_gid"), options: {})
48
- path = "/tasks/{task_gid}/attachments"
49
- path["{task_gid}"] = task_gid
50
- Collection.new(parse(client.get(path, options: options)), type: Attachment, client: client)
48
+ def get_attachments_for_object(client, parent: nil, options: {})
49
+ path = "/attachments"
50
+ params = { parent: parent }.reject { |_,v| v.nil? || Array(v).empty? }
51
+ Collection.new(parse(client.get(path, params: params, options: options)), type: Attachment, client: client)
51
52
  end
52
53
 
53
54
  end
@@ -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
@@ -14,37 +14,14 @@ module Asana
14
14
  class << self
15
15
  # Add a collaborator to a goal
16
16
  #
17
-
17
+ # goal_gid - [str] (required) Globally unique identifier for the goal.
18
18
  # options - [Hash] the request I/O options
19
19
  # > opt_fields - [list[str]] Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
20
20
  # > opt_pretty - [bool] Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
21
21
  # data - [Hash] the attributes to POST
22
- def add_followers(client, options: {}, **data)
22
+ def add_followers(client, goal_gid: required("goal_gid"), options: {}, **data)
23
23
  path = "/goals/{goal_gid}/addFollowers"
24
- 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"
24
+ path["{goal_gid}"] = goal_gid
48
25
  parse(client.post(path, body: data, options: options)).first
49
26
  end
50
27
 
@@ -64,13 +41,14 @@ module Asana
64
41
 
65
42
  # Create a goal metric
66
43
  #
67
-
44
+ # goal_gid - [str] (required) Globally unique identifier for the goal.
68
45
  # options - [Hash] the request I/O options
69
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.
70
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.
71
48
  # data - [Hash] the attributes to POST
72
- def create_goal_metric(client, options: {}, **data)
49
+ def create_goal_metric(client, goal_gid: required("goal_gid"), options: {}, **data)
73
50
  path = "/goals/{goal_gid}/setMetric"
51
+ path["{goal_gid}"] = goal_gid
74
52
  parse(client.post(path, body: data, options: options)).first
75
53
  end
76
54
 
@@ -120,73 +98,29 @@ module Asana
120
98
 
121
99
  # Get parent goals from a goal
122
100
  #
123
-
101
+ # goal_gid - [str] (required) Globally unique identifier for the goal.
124
102
  # options - [Hash] the request I/O options
125
103
  # > opt_fields - [list[str]] Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
126
104
  # > opt_pretty - [bool] Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
127
- def get_parent_goals_for_goal(client, options: {})
105
+ def get_parent_goals_for_goal(client, goal_gid: required("goal_gid"), options: {})
128
106
  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"
107
+ path["{goal_gid}"] = goal_gid
140
108
  Collection.new(parse(client.get(path, options: options)), type: Resource, client: client)
141
109
  end
142
110
 
143
111
  # Remove a collaborator from a goal
144
112
  #
145
-
113
+ # goal_gid - [str] (required) Globally unique identifier for the goal.
146
114
  # options - [Hash] the request I/O options
147
115
  # > 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
116
  # > 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
117
  # data - [Hash] the attributes to POST
150
- def remove_followers(client, options: {}, **data)
118
+ def remove_followers(client, goal_gid: required("goal_gid"), options: {}, **data)
151
119
  path = "/goals/{goal_gid}/removeFollowers"
120
+ path["{goal_gid}"] = goal_gid
152
121
  parse(client.post(path, body: data, options: options)).first
153
122
  end
154
123
 
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
124
  # Update a goal
191
125
  #
192
126
  # goal_gid - [str] (required) Globally unique identifier for the goal.
@@ -202,13 +136,14 @@ module Asana
202
136
 
203
137
  # Update a goal metric
204
138
  #
205
-
139
+ # goal_gid - [str] (required) Globally unique identifier for the goal.
206
140
  # options - [Hash] the request I/O options
207
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.
208
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.
209
143
  # data - [Hash] the attributes to POST
210
- def update_goal_metric(client, options: {}, **data)
144
+ def update_goal_metric(client, goal_gid: required("goal_gid"), options: {}, **data)
211
145
  path = "/goals/{goal_gid}/setMetricCurrentValue"
146
+ path["{goal_gid}"] = goal_gid
212
147
  parse(client.post(path, body: data, options: options)).first
213
148
  end
214
149
 
@@ -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
@@ -53,7 +53,7 @@ module Asana
53
53
  # Get status updates from an object
54
54
  #
55
55
 
56
- # parent - [str] (required) Globally unique identifier for object to fetch statuses from.
56
+ # parent - [str] (required) Globally unique identifier for object to fetch statuses from. Must be a GID for a project, portfolio, or goal.
57
57
  # created_since - [datetime] Only return statuses that have been created since the given time.
58
58
  # options - [Hash] the request I/O options
59
59
  # > offset - [str] Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. 'Note: You can only pass in an offset that was returned to you via a previously paginated request.'
@@ -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
@@ -184,7 +184,7 @@ module Asana
184
184
  # Get multiple tasks
185
185
  #
186
186
 
187
- # assignee - [str] The assignee to filter tasks on. *Note: If you specify `assignee`, you must also specify the `workspace` to filter on.*
187
+ # assignee - [str] The assignee to filter tasks on. If searching for unassigned tasks, assignee.any = null can be specified. *Note: If you specify `assignee`, you must also specify the `workspace` to filter on.*
188
188
  # project - [str] The project to filter tasks on.
189
189
  # section - [str] The section to filter tasks on. *Note: Currently, this is only supported in board views.*
190
190
  # workspace - [str] The workspace to filter tasks on. *Note: If you specify `workspace`, you must also specify the `assignee` to filter on.*
@@ -204,15 +204,17 @@ module Asana
204
204
  # Get tasks from a project
205
205
  #
206
206
  # project_gid - [str] (required) Globally unique identifier for the project.
207
+ # completed_since - [str] Only return tasks that are either incomplete or that have been completed since this time. Accepts a date-time string or the keyword *now*.
207
208
  # options - [Hash] the request I/O options
208
209
  # > offset - [str] Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. 'Note: You can only pass in an offset that was returned to you via a previously paginated request.'
209
210
  # > limit - [int] Results per page. The number of objects to return per page. The value must be between 1 and 100.
210
211
  # > opt_fields - [list[str]] Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
211
212
  # > opt_pretty - [bool] Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
212
- def get_tasks_for_project(client, project_gid: required("project_gid"), options: {})
213
+ def get_tasks_for_project(client, project_gid: required("project_gid"), completed_since: nil, options: {})
213
214
  path = "/projects/{project_gid}/tasks"
214
215
  path["{project_gid}"] = project_gid
215
- Collection.new(parse(client.get(path, options: options)), type: Task, client: client)
216
+ params = { completed_since: completed_since }.reject { |_,v| v.nil? || Array(v).empty? }
217
+ Collection.new(parse(client.get(path, params: params, options: options)), type: Task, client: client)
216
218
  end
217
219
 
218
220
  # Get tasks from a section
@@ -269,7 +271,7 @@ module Asana
269
271
  def remove_dependencies_for_task(client, task_gid: required("task_gid"), options: {}, **data)
270
272
  path = "/tasks/{task_gid}/removeDependencies"
271
273
  path["{task_gid}"] = task_gid
272
- Collection.new(parse(client.post(path, body: data, options: options)), type: Resource, client: client)
274
+ parse(client.post(path, body: data, options: options)).first
273
275
  end
274
276
 
275
277
  # Unlink dependents from a task
@@ -282,7 +284,7 @@ module Asana
282
284
  def remove_dependents_for_task(client, task_gid: required("task_gid"), options: {}, **data)
283
285
  path = "/tasks/{task_gid}/removeDependents"
284
286
  path["{task_gid}"] = task_gid
285
- Collection.new(parse(client.post(path, body: data, options: options)), type: Resource, client: client)
287
+ parse(client.post(path, body: data, options: options)).first
286
288
  end
287
289
 
288
290
  # Remove followers from a task
@@ -295,7 +297,7 @@ module Asana
295
297
  def remove_follower_for_task(client, task_gid: required("task_gid"), options: {}, **data)
296
298
  path = "/tasks/{task_gid}/removeFollowers"
297
299
  path["{task_gid}"] = task_gid
298
- parse(client.post(path, body: data, options: options)).first
300
+ Task.new(parse(client.post(path, body: data, options: options)).first, client: client)
299
301
  end
300
302
 
301
303
  # Remove a project from a task
@@ -53,20 +53,6 @@ module Asana
53
53
  Team.new(parse(client.get(path, options: options)).first, client: client)
54
54
  end
55
55
 
56
- # Get teams in an organization
57
- #
58
- # workspace_gid - [str] (required) Globally unique identifier for the workspace or organization.
59
- # options - [Hash] the request I/O options
60
- # > offset - [str] Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. 'Note: You can only pass in an offset that was returned to you via a previously paginated request.'
61
- # > limit - [int] Results per page. The number of objects to return per page. The value must be between 1 and 100.
62
- # > opt_fields - [list[str]] Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
63
- # > opt_pretty - [bool] Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
64
- def get_teams_for_organization(client, workspace_gid: required("workspace_gid"), options: {})
65
- path = "/organizations/{workspace_gid}/teams"
66
- path["{workspace_gid}"] = workspace_gid
67
- Collection.new(parse(client.get(path, options: options)), type: Team, client: client)
68
- end
69
-
70
56
  # Get teams for a user
71
57
  #
72
58
  # user_gid - [str] (required) A string identifying a user. This can either be the string \"me\", an email, or the gid of a user.
@@ -83,6 +69,20 @@ module Asana
83
69
  Collection.new(parse(client.get(path, params: params, options: options)), type: Team, client: client)
84
70
  end
85
71
 
72
+ # Get teams in a workspace
73
+ #
74
+ # workspace_gid - [str] (required) Globally unique identifier for the workspace or organization.
75
+ # options - [Hash] the request I/O options
76
+ # > offset - [str] Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. 'Note: You can only pass in an offset that was returned to you via a previously paginated request.'
77
+ # > limit - [int] Results per page. The number of objects to return per page. The value must be between 1 and 100.
78
+ # > opt_fields - [list[str]] Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
79
+ # > opt_pretty - [bool] Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
80
+ def get_teams_for_workspace(client, workspace_gid: required("workspace_gid"), options: {})
81
+ path = "/workspaces/{workspace_gid}/teams"
82
+ path["{workspace_gid}"] = workspace_gid
83
+ Collection.new(parse(client.get(path, options: options)), type: Team, client: client)
84
+ end
85
+
86
86
  # Remove a user from a team
87
87
  #
88
88
  # team_gid - [str] (required) Globally unique identifier for the team.
@@ -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.
@@ -22,7 +22,7 @@ module Asana
22
22
  def add_user_for_workspace(client, workspace_gid: required("workspace_gid"), options: {}, **data)
23
23
  path = "/workspaces/{workspace_gid}/addUser"
24
24
  path["{workspace_gid}"] = workspace_gid
25
- User.new(parse(client.post(path, body: data, options: options)).first, client: client)
25
+ parse(client.post(path, body: data, options: options)).first
26
26
  end
27
27
 
28
28
  # Get a workspace
data/lib/asana/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  #:nodoc:
2
2
  module Asana
3
3
  # Public: Version of the gem.
4
- VERSION = '0.10.12'
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(task_gid: 'task_gid', 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
 
@@ -29,7 +29,7 @@ attachments:
29
29
 
30
30
 
31
31
  result = client.attachments.get_attachment(attachment_gid: 'attachment_gid', param: "value", param: "value", options: {pretty: true})
32
- get_attachments_for_task: >-
32
+ get_attachments_for_object: >-
33
33
  require 'asana'
34
34
 
35
35
 
@@ -38,4 +38,4 @@ attachments:
38
38
  end
39
39
 
40
40
 
41
- result = client.attachments.get_attachments_for_task(task_gid: 'task_gid', param: "value", param: "value", options: {pretty: true})
41
+ result = client.attachments.get_attachments_for_object(parent: '&#x27;parent_example&#x27;', param: "value", param: "value", options: {pretty: true})
@@ -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})
@@ -8,27 +8,7 @@ goals:
8
8
  end
9
9
 
10
10
 
11
- result = client.goals.add_followers(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(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(field: "value", field: "value", options: {pretty: true})
11
+ result = client.goals.add_followers(goal_gid: 'goal_gid', field: "value", field: "value", options: {pretty: true})
32
12
  create_goal: >-
33
13
  require 'asana'
34
14
 
@@ -48,7 +28,7 @@ goals:
48
28
  end
49
29
 
50
30
 
51
- result = client.goals.create_goal_metric(field: "value", field: "value", options: {pretty: true})
31
+ result = client.goals.create_goal_metric(goal_gid: 'goal_gid', field: "value", field: "value", options: {pretty: true})
52
32
  delete_goal: >-
53
33
  require 'asana'
54
34
 
@@ -88,17 +68,7 @@ goals:
88
68
  end
89
69
 
90
70
 
91
- result = client.goals.get_parent_goals_for_goal(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(param: "value", param: "value", options: {pretty: true})
71
+ result = client.goals.get_parent_goals_for_goal(goal_gid: 'goal_gid', param: "value", param: "value", options: {pretty: true})
102
72
  remove_followers: >-
103
73
  require 'asana'
104
74
 
@@ -108,37 +78,7 @@ goals:
108
78
  end
109
79
 
110
80
 
111
- result = client.goals.remove_followers(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(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(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(param: "value", param: "value", options: {pretty: true})
81
+ result = client.goals.remove_followers(goal_gid: 'goal_gid', field: "value", field: "value", options: {pretty: true})
142
82
  update_goal: >-
143
83
  require 'asana'
144
84
 
@@ -158,4 +98,4 @@ goals:
158
98
  end
159
99
 
160
100
 
161
- result = client.goals.update_goal_metric(field: "value", field: "value", options: {pretty: true})
101
+ result = client.goals.update_goal_metric(goal_gid: 'goal_gid', field: "value", field: "value", options: {pretty: true})
@@ -29,7 +29,7 @@ teams:
29
29
 
30
30
 
31
31
  result = client.teams.get_team(team_gid: 'team_gid', param: "value", param: "value", options: {pretty: true})
32
- get_teams_for_organization: >-
32
+ get_teams_for_user: >-
33
33
  require 'asana'
34
34
 
35
35
 
@@ -38,8 +38,8 @@ teams:
38
38
  end
39
39
 
40
40
 
41
- result = client.teams.get_teams_for_organization(workspace_gid: 'workspace_gid', param: "value", param: "value", options: {pretty: true})
42
- get_teams_for_user: >-
41
+ result = client.teams.get_teams_for_user(user_gid: 'user_gid', organization: '&#x27;organization_example&#x27;', param: "value", param: "value", options: {pretty: true})
42
+ get_teams_for_workspace: >-
43
43
  require 'asana'
44
44
 
45
45
 
@@ -48,7 +48,7 @@ teams:
48
48
  end
49
49
 
50
50
 
51
- result = client.teams.get_teams_for_user(user_gid: 'user_gid', organization: '&#x27;organization_example&#x27;', param: "value", param: "value", options: {pretty: true})
51
+ result = client.teams.get_teams_for_workspace(workspace_gid: 'workspace_gid', param: "value", param: "value", options: {pretty: true})
52
52
  remove_user_for_team: >-
53
53
  require 'asana'
54
54
 
@@ -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,29 +1,35 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: asana
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.12
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-22 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
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: '1.4'
20
+ - - "<"
21
+ - !ruby/object:Gem::Version
22
+ version: '3'
20
23
  type: :runtime
21
24
  prerelease: false
22
25
  version_requirements: !ruby/object:Gem::Requirement
23
26
  requirements:
24
- - - "~>"
27
+ - - ">="
25
28
  - !ruby/object:Gem::Version
26
29
  version: '1.4'
30
+ - - "<"
31
+ - !ruby/object:Gem::Version
32
+ version: '3'
27
33
  - !ruby/object:Gem::Dependency
28
34
  name: faraday
29
35
  requirement: !ruby/object:Gem::Requirement
@@ -182,6 +188,7 @@ files:
182
188
  - lib/asana/resources/gen/custom_field_settings_base.rb
183
189
  - lib/asana/resources/gen/custom_fields_base.rb
184
190
  - lib/asana/resources/gen/events_base.rb
191
+ - lib/asana/resources/gen/goal_relationships_base.rb
185
192
  - lib/asana/resources/gen/goals_base.rb
186
193
  - lib/asana/resources/gen/jobs_base.rb
187
194
  - lib/asana/resources/gen/organization_exports_base.rb
@@ -237,6 +244,7 @@ files:
237
244
  - samples/custom_field_settings_sample.yaml
238
245
  - samples/custom_fields_sample.yaml
239
246
  - samples/events_sample.yaml
247
+ - samples/goal_relationships_sample.yaml
240
248
  - samples/goals_sample.yaml
241
249
  - samples/jobs_sample.yaml
242
250
  - samples/organization_exports_sample.yaml