asana 0.18.14 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -143,7 +143,7 @@ a number of results per page to fetch, between `1` and `100`.
143
143
  It defaults to `50` if you don't provide any.
144
144
 
145
145
  ```js
146
- client.tasks.findByTag(tagId, { limit: 5 }).then(function(collection) {
146
+ client.tasks.getTasksForTag(tagId, { limit: 5 }).then(function(collection) {
147
147
  console.log(collection.data);
148
148
  // [ .. array of up to 5 task objects .. ]
149
149
  });
@@ -158,7 +158,7 @@ To get the next page of a collection, you do not have to manually construct
158
158
  the next request. The `nextPage()` method takes care of this for you:
159
159
 
160
160
  ```js
161
- client.tasks.findByTag(tagId).then(firstPage => {
161
+ client.tasks.getTasksForTag(tagId).then(firstPage => {
162
162
  console.log(firstPage.data);
163
163
  firstPage.nextPage().then(secondPage => {
164
164
  console.log(secondPage.data);
@@ -172,7 +172,7 @@ To automatically fetch a bunch of results and have the client transparently
172
172
  request pages under the hood, use the `fetch()` method:
173
173
 
174
174
  ```js
175
- client.tasks.findByTag(tagId).then(collection => {
175
+ client.tasks.getTasksForTag(tagId).then(collection => {
176
176
  // Fetch up to 200 tasks, using multiple pages if necessary
177
177
  collection.fetch(200).then(tasks => {
178
178
  console.log(tasks);
@@ -187,7 +187,7 @@ You can also construct a `stream` from a collection. This will transparently
187
187
  through them.
188
188
 
189
189
  ```js
190
- client.tasks.findByTag(tagId).then(collection => {
190
+ client.tasks.getTasksForTag(tagId).then(collection => {
191
191
  collection.stream().on('data', task => {
192
192
  console.log(task);
193
193
  });
@@ -254,7 +254,7 @@ client.users.me()
254
254
  // any user can have multiple workspaces so you can't always assume this
255
255
  // is the one you want to work with.
256
256
  const workspaceId = user.workspaces[0].gid;
257
- return client.tasks.findAll({
257
+ return client.tasks.getTasks({
258
258
  assignee: userId,
259
259
  workspace: workspaceId,
260
260
  completed_since: 'now',
package/VERSION CHANGED
@@ -1 +1 @@
1
- 0.18.14
1
+ 1.18.15
package/bower.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "asana",
3
3
  "main": "dist/asana.js",
4
- "version": "0.18.14",
4
+ "version": "1.0.1",
5
5
  "homepage": "https://github.com/Asana/node-asana",
6
6
  "authors": [
7
7
  "Greg Slovacek <greg@asana.com>",
package/lib/client.js CHANGED
@@ -32,6 +32,11 @@ function Client(dispatcher, options) {
32
32
  * @type {Attachments}
33
33
  */
34
34
  this.attachments = new resources.Attachments(this.dispatcher);
35
+ /**
36
+ * An instance of the AuditLogAPI resource.
37
+ * @type {AuditLogAPI}
38
+ */
39
+ this.auditLogAPI = new resources.AuditLogAPI(this.dispatcher);
35
40
  /**
36
41
  * An instance of the BatchAPI resource.
37
42
  * @type {BatchAPI}
@@ -0,0 +1,6 @@
1
+ var AuditLogAPI = require('./gen/audit_log_api');
2
+ /* jshint ignore:start */
3
+ var util = require('util');
4
+
5
+ /* jshint ignore:end */
6
+ module.exports = AuditLogAPI;
@@ -55,9 +55,9 @@ Attachments.prototype.getAttachment = function(
55
55
 
56
56
 
57
57
  /**
58
- * Get attachments for a task
59
- * @param {String} taskGid: (required) The task to operate on.
58
+ * Get attachments from an object
60
59
  * @param {Object} params: Parameters for the request
60
+ - parent {String}: (required) Globally unique identifier for object to fetch statuses from. Must be a GID for a task or project_brief.
61
61
  - offset {String}: 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.'
62
62
  - limit {Number}: Results per page. The number of objects to return per page. The value must be between 1 and 100.
63
63
  - optFields {[String]}: 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.
@@ -65,12 +65,11 @@ Attachments.prototype.getAttachment = function(
65
65
  * @param {Object} [dispatchOptions]: Options, if any, to pass the dispatcher for the request
66
66
  * @return {Promise} The requested resource
67
67
  */
68
- Attachments.prototype.getAttachmentsForTask = function(
69
- taskGid,
68
+ Attachments.prototype.getAttachmentsForObject = function(
70
69
  params,
71
70
  dispatchOptions
72
71
  ) {
73
- var path = "/tasks/{task_gid}/attachments".replace("{task_gid}", taskGid);
72
+ var path = "/attachments";
74
73
 
75
74
  return this.dispatchGetCollection(path, params, dispatchOptions)
76
75
  };
@@ -18,15 +18,17 @@ util.inherits(Goals, Resource);
18
18
 
19
19
  /**
20
20
  * Add a collaborator to a goal
21
+ * @param {String} goalGid: (required) Globally unique identifier for the goal.
21
22
  * @param {Object} data: Data for the request
22
23
  * @param {Object} [dispatchOptions]: Options, if any, to pass the dispatcher for the request
23
24
  * @return {Promise} The requested resource
24
25
  */
25
26
  Goals.prototype.addFollowers = function(
27
+ goalGid,
26
28
  data,
27
29
  dispatchOptions
28
30
  ) {
29
- var path = "/goals/{goal_gid}/addFollowers";
31
+ var path = "/goals/{goal_gid}/addFollowers".replace("{goal_gid}", goalGid);
30
32
 
31
33
  return this.dispatchPost(path, data, dispatchOptions)
32
34
  };
@@ -34,15 +36,17 @@ Goals.prototype.addFollowers = function(
34
36
 
35
37
  /**
36
38
  * Add a subgoal to a parent goal
39
+ * @param {String} goalGid: (required) Globally unique identifier for the goal.
37
40
  * @param {Object} data: Data for the request
38
41
  * @param {Object} [dispatchOptions]: Options, if any, to pass the dispatcher for the request
39
42
  * @return {Promise} The requested resource
40
43
  */
41
44
  Goals.prototype.addSubgoal = function(
45
+ goalGid,
42
46
  data,
43
47
  dispatchOptions
44
48
  ) {
45
- var path = "/goals/{goal_gid}/addSubgoal";
49
+ var path = "/goals/{goal_gid}/addSubgoal".replace("{goal_gid}", goalGid);
46
50
 
47
51
  return this.dispatchPost(path, data, dispatchOptions)
48
52
  };
@@ -50,15 +54,17 @@ Goals.prototype.addSubgoal = function(
50
54
 
51
55
  /**
52
56
  * Add a project/portfolio as supporting work for a goal.
57
+ * @param {String} goalGid: (required) Globally unique identifier for the goal.
53
58
  * @param {Object} data: Data for the request
54
59
  * @param {Object} [dispatchOptions]: Options, if any, to pass the dispatcher for the request
55
60
  * @return {Promise} The requested resource
56
61
  */
57
62
  Goals.prototype.addSupportingWorkForGoal = function(
63
+ goalGid,
58
64
  data,
59
65
  dispatchOptions
60
66
  ) {
61
- var path = "/goals/{goal_gid}/addSupportingWork";
67
+ var path = "/goals/{goal_gid}/addSupportingWork".replace("{goal_gid}", goalGid);
62
68
 
63
69
  return this.dispatchPost(path, data, dispatchOptions)
64
70
  };
@@ -82,15 +88,17 @@ Goals.prototype.createGoal = function(
82
88
 
83
89
  /**
84
90
  * Create a goal metric
91
+ * @param {String} goalGid: (required) Globally unique identifier for the goal.
85
92
  * @param {Object} data: Data for the request
86
93
  * @param {Object} [dispatchOptions]: Options, if any, to pass the dispatcher for the request
87
94
  * @return {Promise} The requested resource
88
95
  */
89
96
  Goals.prototype.createGoalMetric = function(
97
+ goalGid,
90
98
  data,
91
99
  dispatchOptions
92
100
  ) {
93
- var path = "/goals/{goal_gid}/setMetric";
101
+ var path = "/goals/{goal_gid}/setMetric".replace("{goal_gid}", goalGid);
94
102
 
95
103
  return this.dispatchPost(path, data, dispatchOptions)
96
104
  };
@@ -162,6 +170,7 @@ Goals.prototype.getGoals = function(
162
170
 
163
171
  /**
164
172
  * Get parent goals from a goal
173
+ * @param {String} goalGid: (required) Globally unique identifier for the goal.
165
174
  * @param {Object} params: Parameters for the request
166
175
  - optFields {[String]}: 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
176
  - optPretty {Boolean}: 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.
@@ -169,10 +178,11 @@ Goals.prototype.getGoals = function(
169
178
  * @return {Promise} The requested resource
170
179
  */
171
180
  Goals.prototype.getParentGoalsForGoal = function(
181
+ goalGid,
172
182
  params,
173
183
  dispatchOptions
174
184
  ) {
175
- var path = "/goals/{goal_gid}/parentGoals";
185
+ var path = "/goals/{goal_gid}/parentGoals".replace("{goal_gid}", goalGid);
176
186
 
177
187
  return this.dispatchGetCollection(path, params, dispatchOptions)
178
188
  };
@@ -180,6 +190,7 @@ Goals.prototype.getParentGoalsForGoal = function(
180
190
 
181
191
  /**
182
192
  * Get subgoals from a goal
193
+ * @param {String} goalGid: (required) Globally unique identifier for the goal.
183
194
  * @param {Object} params: Parameters for the request
184
195
  - optFields {[String]}: 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.
185
196
  - optPretty {Boolean}: 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.
@@ -187,10 +198,11 @@ Goals.prototype.getParentGoalsForGoal = function(
187
198
  * @return {Promise} The requested resource
188
199
  */
189
200
  Goals.prototype.getSubgoalsForGoal = function(
201
+ goalGid,
190
202
  params,
191
203
  dispatchOptions
192
204
  ) {
193
- var path = "/goals/{goal_gid}/subgoals";
205
+ var path = "/goals/{goal_gid}/subgoals".replace("{goal_gid}", goalGid);
194
206
 
195
207
  return this.dispatchGetCollection(path, params, dispatchOptions)
196
208
  };
@@ -198,15 +210,17 @@ Goals.prototype.getSubgoalsForGoal = function(
198
210
 
199
211
  /**
200
212
  * Remove a collaborator from a goal
213
+ * @param {String} goalGid: (required) Globally unique identifier for the goal.
201
214
  * @param {Object} data: Data for the request
202
215
  * @param {Object} [dispatchOptions]: Options, if any, to pass the dispatcher for the request
203
216
  * @return {Promise} The requested resource
204
217
  */
205
218
  Goals.prototype.removeFollowers = function(
219
+ goalGid,
206
220
  data,
207
221
  dispatchOptions
208
222
  ) {
209
- var path = "/goals/{goal_gid}/removeFollowers";
223
+ var path = "/goals/{goal_gid}/removeFollowers".replace("{goal_gid}", goalGid);
210
224
 
211
225
  return this.dispatchPost(path, data, dispatchOptions)
212
226
  };
@@ -214,15 +228,17 @@ Goals.prototype.removeFollowers = function(
214
228
 
215
229
  /**
216
230
  * Remove a subgoal from a goal
231
+ * @param {String} goalGid: (required) Globally unique identifier for the goal.
217
232
  * @param {Object} data: Data for the request
218
233
  * @param {Object} [dispatchOptions]: Options, if any, to pass the dispatcher for the request
219
234
  * @return {Promise} The requested resource
220
235
  */
221
236
  Goals.prototype.removeSubgoal = function(
237
+ goalGid,
222
238
  data,
223
239
  dispatchOptions
224
240
  ) {
225
- var path = "/goals/{goal_gid}/removeSubgoal";
241
+ var path = "/goals/{goal_gid}/removeSubgoal".replace("{goal_gid}", goalGid);
226
242
 
227
243
  return this.dispatchPost(path, data, dispatchOptions)
228
244
  };
@@ -230,15 +246,17 @@ Goals.prototype.removeSubgoal = function(
230
246
 
231
247
  /**
232
248
  * Remove a project/portfolio as supporting work for a goal.
249
+ * @param {String} goalGid: (required) Globally unique identifier for the goal.
233
250
  * @param {Object} data: Data for the request
234
251
  * @param {Object} [dispatchOptions]: Options, if any, to pass the dispatcher for the request
235
252
  * @return {Promise} The requested resource
236
253
  */
237
254
  Goals.prototype.removeSupportingWorkForGoal = function(
255
+ goalGid,
238
256
  data,
239
257
  dispatchOptions
240
258
  ) {
241
- var path = "/goals/{goal_gid}/removeSupportingWork";
259
+ var path = "/goals/{goal_gid}/removeSupportingWork".replace("{goal_gid}", goalGid);
242
260
 
243
261
  return this.dispatchPost(path, data, dispatchOptions)
244
262
  };
@@ -246,6 +264,7 @@ Goals.prototype.removeSupportingWorkForGoal = function(
246
264
 
247
265
  /**
248
266
  * Get supporting work from a goal
267
+ * @param {String} goalGid: (required) Globally unique identifier for the goal.
249
268
  * @param {Object} params: Parameters for the request
250
269
  - optFields {[String]}: 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.
251
270
  - optPretty {Boolean}: 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.
@@ -253,10 +272,11 @@ Goals.prototype.removeSupportingWorkForGoal = function(
253
272
  * @return {Promise} The requested resource
254
273
  */
255
274
  Goals.prototype.supportingWork = function(
275
+ goalGid,
256
276
  params,
257
277
  dispatchOptions
258
278
  ) {
259
- var path = "/goals/{goal_gid}/supportingWork";
279
+ var path = "/goals/{goal_gid}/supportingWork".replace("{goal_gid}", goalGid);
260
280
 
261
281
  return this.dispatchGetCollection(path, params, dispatchOptions)
262
282
  };
@@ -282,15 +302,17 @@ Goals.prototype.updateGoal = function(
282
302
 
283
303
  /**
284
304
  * Update a goal metric
305
+ * @param {String} goalGid: (required) Globally unique identifier for the goal.
285
306
  * @param {Object} data: Data for the request
286
307
  * @param {Object} [dispatchOptions]: Options, if any, to pass the dispatcher for the request
287
308
  * @return {Promise} The requested resource
288
309
  */
289
310
  Goals.prototype.updateGoalMetric = function(
311
+ goalGid,
290
312
  data,
291
313
  dispatchOptions
292
314
  ) {
293
- var path = "/goals/{goal_gid}/setMetricCurrentValue";
315
+ var path = "/goals/{goal_gid}/setMetricCurrentValue".replace("{goal_gid}", goalGid);
294
316
 
295
317
  return this.dispatchPost(path, data, dispatchOptions)
296
318
  };
@@ -73,7 +73,7 @@ StatusUpdates.prototype.getStatus = function(
73
73
  /**
74
74
  * Get status updates from an object
75
75
  * @param {Object} params: Parameters for the request
76
- - parent {String}: (required) Globally unique identifier for object to fetch statuses from.
76
+ - parent {String}: (required) Globally unique identifier for object to fetch statuses from. Must be a GID for a project, portfolio, or goal.
77
77
  - createdSince {Date}: Only return statuses that have been created since the given time.
78
78
  - offset {String}: 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.'
79
79
  - limit {Number}: Results per page. The number of objects to return per page. The value must be between 1 and 100.
@@ -265,7 +265,7 @@ Tasks.prototype.getTask = function(
265
265
  /**
266
266
  * Get multiple tasks
267
267
  * @param {Object} params: Parameters for the request
268
- - assignee {String}: The assignee to filter tasks on. *Note: If you specify `assignee`, you must also specify the `workspace` to filter on.*
268
+ - assignee {String}: 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.*
269
269
  - project {String}: The project to filter tasks on.
270
270
  - section {String}: The section to filter tasks on. *Note: Currently, this is only supported in board views.*
271
271
  - workspace {String}: The workspace to filter tasks on. *Note: If you specify `workspace`, you must also specify the `assignee` to filter on.*
@@ -292,6 +292,7 @@ Tasks.prototype.getTasks = function(
292
292
  * Get tasks from a project
293
293
  * @param {String} projectGid: (required) Globally unique identifier for the project.
294
294
  * @param {Object} params: Parameters for the request
295
+ - completedSince {String}: Only return tasks that are either incomplete or that have been completed since this time. Accepts a date-time string or the keyword *now*.
295
296
  - offset {String}: 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.'
296
297
  - limit {Number}: Results per page. The number of objects to return per page. The value must be between 1 and 100.
297
298
  - optFields {[String]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
@@ -73,9 +73,10 @@ Teams.prototype.getTeam = function(
73
73
 
74
74
 
75
75
  /**
76
- * Get teams in an organization
77
- * @param {String} workspaceGid: (required) Globally unique identifier for the workspace or organization.
76
+ * Get teams for a user
77
+ * @param {String} userGid: (required) A string identifying a user. This can either be the string \"me\", an email, or the gid of a user.
78
78
  * @param {Object} params: Parameters for the request
79
+ - organization {String}: (required) The workspace or organization to filter teams on.
79
80
  - offset {String}: 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.'
80
81
  - limit {Number}: Results per page. The number of objects to return per page. The value must be between 1 and 100.
81
82
  - optFields {[String]}: Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
@@ -83,22 +84,21 @@ Teams.prototype.getTeam = function(
83
84
  * @param {Object} [dispatchOptions]: Options, if any, to pass the dispatcher for the request
84
85
  * @return {Promise} The requested resource
85
86
  */
86
- Teams.prototype.getTeamsForOrganization = function(
87
- workspaceGid,
87
+ Teams.prototype.getTeamsForUser = function(
88
+ userGid,
88
89
  params,
89
90
  dispatchOptions
90
91
  ) {
91
- var path = "/organizations/{workspace_gid}/teams".replace("{workspace_gid}", workspaceGid);
92
+ var path = "/users/{user_gid}/teams".replace("{user_gid}", userGid);
92
93
 
93
94
  return this.dispatchGetCollection(path, params, dispatchOptions)
94
95
  };
95
96
 
96
97
 
97
98
  /**
98
- * Get teams for a user
99
- * @param {String} userGid: (required) A string identifying a user. This can either be the string \"me\", an email, or the gid of a user.
99
+ * Get teams in a workspace
100
+ * @param {String} workspaceGid: (required) Globally unique identifier for the workspace or organization.
100
101
  * @param {Object} params: Parameters for the request
101
- - organization {String}: (required) The workspace or organization to filter teams on.
102
102
  - offset {String}: 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.'
103
103
  - limit {Number}: Results per page. The number of objects to return per page. The value must be between 1 and 100.
104
104
  - optFields {[String]}: 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,12 +106,12 @@ Teams.prototype.getTeamsForOrganization = function(
106
106
  * @param {Object} [dispatchOptions]: Options, if any, to pass the dispatcher for the request
107
107
  * @return {Promise} The requested resource
108
108
  */
109
- Teams.prototype.getTeamsForUser = function(
110
- userGid,
109
+ Teams.prototype.getTeamsForWorkspace = function(
110
+ workspaceGid,
111
111
  params,
112
112
  dispatchOptions
113
113
  ) {
114
- var path = "/users/{user_gid}/teams".replace("{user_gid}", userGid);
114
+ var path = "/workspaces/{workspace_gid}/teams".replace("{workspace_gid}", workspaceGid);
115
115
 
116
116
  return this.dispatchGetCollection(path, params, dispatchOptions)
117
117
  };
@@ -1,6 +1,7 @@
1
1
  exports.Resource = require('./resource');
2
2
 
3
3
  exports.Attachments = require('./attachments');
4
+ exports.AuditLogAPI = require('./audit_log_api');
4
5
  exports.BatchAPI = require('./batch_api');
5
6
  exports.CustomFieldSettings = require('./custom_field_settings');
6
7
  exports.CustomFields = require('./custom_fields');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "asana",
3
- "version": "0.18.14",
3
+ "version": "1.0.1",
4
4
  "description": "Official NodeJS and BrowserJS client for the Asana API",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -6,7 +6,7 @@ attachments:
6
6
  const client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');
7
7
 
8
8
 
9
- client.attachments.createAttachmentForTask(taskGid, {field: "value", field: "value", pretty: true})
9
+ client.attachments.createAttachmentForTask({field: "value", field: "value", pretty: true})
10
10
  .then((result) => {
11
11
  console.log(result);
12
12
  });
@@ -32,14 +32,14 @@ attachments:
32
32
  .then((result) => {
33
33
  console.log(result);
34
34
  });
35
- getAttachmentsForTask: >-
35
+ getAttachmentsForObject: >-
36
36
  const asana = require('asana');
37
37
 
38
38
 
39
39
  const client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');
40
40
 
41
41
 
42
- client.attachments.getAttachmentsForTask(taskGid, {param: "value", param: "value", opt_pretty: true})
42
+ client.attachments.getAttachmentsForObject({param: "value", param: "value", opt_pretty: true})
43
43
  .then((result) => {
44
44
  console.log(result);
45
45
  });
@@ -6,7 +6,7 @@ goals:
6
6
  const client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');
7
7
 
8
8
 
9
- client.goals.addFollowers({field: "value", field: "value", pretty: true})
9
+ client.goals.addFollowers(goalGid, {field: "value", field: "value", pretty: true})
10
10
  .then((result) => {
11
11
  console.log(result);
12
12
  });
@@ -17,7 +17,7 @@ goals:
17
17
  const client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');
18
18
 
19
19
 
20
- client.goals.addSubgoal({field: "value", field: "value", pretty: true})
20
+ client.goals.addSubgoal(goalGid, {field: "value", field: "value", pretty: true})
21
21
  .then((result) => {
22
22
  console.log(result);
23
23
  });
@@ -28,7 +28,7 @@ goals:
28
28
  const client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');
29
29
 
30
30
 
31
- client.goals.addSupportingWorkForGoal({field: "value", field: "value", pretty: true})
31
+ client.goals.addSupportingWorkForGoal(goalGid, {field: "value", field: "value", pretty: true})
32
32
  .then((result) => {
33
33
  console.log(result);
34
34
  });
@@ -50,7 +50,7 @@ goals:
50
50
  const client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');
51
51
 
52
52
 
53
- client.goals.createGoalMetric({field: "value", field: "value", pretty: true})
53
+ client.goals.createGoalMetric(goalGid, {field: "value", field: "value", pretty: true})
54
54
  .then((result) => {
55
55
  console.log(result);
56
56
  });
@@ -94,7 +94,7 @@ goals:
94
94
  const client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');
95
95
 
96
96
 
97
- client.goals.getParentGoalsForGoal({param: "value", param: "value", opt_pretty: true})
97
+ client.goals.getParentGoalsForGoal(goalGid, {param: "value", param: "value", opt_pretty: true})
98
98
  .then((result) => {
99
99
  console.log(result);
100
100
  });
@@ -105,7 +105,7 @@ goals:
105
105
  const client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');
106
106
 
107
107
 
108
- client.goals.getSubgoalsForGoal({param: "value", param: "value", opt_pretty: true})
108
+ client.goals.getSubgoalsForGoal(goalGid, {param: "value", param: "value", opt_pretty: true})
109
109
  .then((result) => {
110
110
  console.log(result);
111
111
  });
@@ -116,7 +116,7 @@ goals:
116
116
  const client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');
117
117
 
118
118
 
119
- client.goals.removeFollowers({field: "value", field: "value", pretty: true})
119
+ client.goals.removeFollowers(goalGid, {field: "value", field: "value", pretty: true})
120
120
  .then((result) => {
121
121
  console.log(result);
122
122
  });
@@ -127,7 +127,7 @@ goals:
127
127
  const client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');
128
128
 
129
129
 
130
- client.goals.removeSubgoal({field: "value", field: "value", pretty: true})
130
+ client.goals.removeSubgoal(goalGid, {field: "value", field: "value", pretty: true})
131
131
  .then((result) => {
132
132
  console.log(result);
133
133
  });
@@ -138,7 +138,7 @@ goals:
138
138
  const client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');
139
139
 
140
140
 
141
- client.goals.removeSupportingWorkForGoal({field: "value", field: "value", pretty: true})
141
+ client.goals.removeSupportingWorkForGoal(goalGid, {field: "value", field: "value", pretty: true})
142
142
  .then((result) => {
143
143
  console.log(result);
144
144
  });
@@ -149,7 +149,7 @@ goals:
149
149
  const client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');
150
150
 
151
151
 
152
- client.goals.supportingWork({param: "value", param: "value", opt_pretty: true})
152
+ client.goals.supportingWork(goalGid, {param: "value", param: "value", opt_pretty: true})
153
153
  .then((result) => {
154
154
  console.log(result);
155
155
  });
@@ -171,7 +171,7 @@ goals:
171
171
  const client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');
172
172
 
173
173
 
174
- client.goals.updateGoalMetric({field: "value", field: "value", pretty: true})
174
+ client.goals.updateGoalMetric(goalGid, {field: "value", field: "value", pretty: true})
175
175
  .then((result) => {
176
176
  console.log(result);
177
177
  });
@@ -32,25 +32,25 @@ teams:
32
32
  .then((result) => {
33
33
  console.log(result);
34
34
  });
35
- getTeamsForOrganization: >-
35
+ getTeamsForUser: >-
36
36
  const asana = require('asana');
37
37
 
38
38
 
39
39
  const client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');
40
40
 
41
41
 
42
- client.teams.getTeamsForOrganization(workspaceGid, {param: "value", param: "value", opt_pretty: true})
42
+ client.teams.getTeamsForUser(userGid, {param: "value", param: "value", opt_pretty: true})
43
43
  .then((result) => {
44
44
  console.log(result);
45
45
  });
46
- getTeamsForUser: >-
46
+ getTeamsForWorkspace: >-
47
47
  const asana = require('asana');
48
48
 
49
49
 
50
50
  const client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');
51
51
 
52
52
 
53
- client.teams.getTeamsForUser(userGid, {param: "value", param: "value", opt_pretty: true})
53
+ client.teams.getTeamsForWorkspace(workspaceGid, {param: "value", param: "value", opt_pretty: true})
54
54
  .then((result) => {
55
55
  console.log(result);
56
56
  });