asana 1.0.0 → 1.0.2
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 +5 -5
- package/VERSION +1 -1
- package/bower.json +1 -1
- package/lib/client.js +5 -0
- package/lib/resources/audit_log_api.js +6 -0
- package/lib/resources/index.js +1 -0
- package/package.json +1 -1
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
257
|
+
return client.tasks.getTasks({
|
|
258
258
|
assignee: userId,
|
|
259
259
|
workspace: workspaceId,
|
|
260
260
|
completed_since: 'now',
|
package/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
1.18.
|
|
1
|
+
1.18.16
|
package/bower.json
CHANGED
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}
|
package/lib/resources/index.js
CHANGED
|
@@ -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');
|