Comparing version 0.17.1 to 0.17.3
@@ -9,2 +9,3 @@ var EventStream = require('../util/event_stream'); | ||
* @param {String} [syncToken] Token from a previous sync, if any | ||
* @param {Object} [params] Parameters for the request | ||
* @return {Promise} The result of the API call: | ||
@@ -15,10 +16,9 @@ * {String} sync The new sync token to use for the next request | ||
*/ | ||
Events.prototype.get = function(resourceId, syncToken) { | ||
var params = { | ||
resource: resourceId | ||
}; | ||
Events.prototype.get = function(resourceId, syncToken, params) { | ||
var requestParams = params || {}; | ||
requestParams.resource = resourceId; | ||
if (syncToken) { | ||
params.sync = syncToken; | ||
requestParams.sync = syncToken; | ||
} | ||
return this.dispatcher.get('/events', params); | ||
return this.dispatcher.get('/events', requestParams); | ||
}; | ||
@@ -40,2 +40,2 @@ | ||
Events.EventStream = EventStream; | ||
module.exports = Events; | ||
module.exports = Events; |
@@ -174,4 +174,22 @@ | ||
/** | ||
* Returns the compact task records for all tasks with the given tag. | ||
* Tasks can have more than one tag at a time. | ||
* @param {String} tag The tag to fetch tasks from. | ||
* @param {Object} [params] Parameters for the request | ||
* @param {Object} [dispatchOptions] Options, if any, to pass the dispatcher for the request | ||
* @return {Promise} The response from the API | ||
*/ | ||
Tags.prototype.getTasksWithTag = function( | ||
tag, | ||
params, | ||
dispatchOptions | ||
) { | ||
var path = util.format('/tags/%s/tasks', tag); | ||
return this.dispatchGetCollection(path, params, dispatchOptions); | ||
}; | ||
module.exports = Tags; | ||
/* jshint ignore:end */ |
{ | ||
"name": "asana", | ||
"version": "0.17.1", | ||
"version": "0.17.3", | ||
"description": "Official NodeJS and BrowserJS client for the Asana API", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -182,3 +182,3 @@ # Asana [![GitHub release][release-image]]() [![Build Status][travis-image]][travis-url] [![NPM Version][npm-image]][npm-url] | ||
asana.Client.create({"defaultHeaders", {"asana-enable": "new-sections"}}); | ||
asana.Client.create({"defaultHeaders": {"asana-enable": "string_ids,new_sections"}}); | ||
@@ -185,0 +185,0 @@ ### Asana Change Warnings |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
1638197
38102