Socket
Socket
Sign inDemoInstall

asana

Package Overview
Dependencies
50
Maintainers
4
Versions
87
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.9.1 to 0.9.2

.idea/.name

2

bower.json
{
"name": "asana",
"main": "dist/asana.js",
"version": "0.8.3",
"version": "0.8.4",
"homepage": "https://github.com/Asana/node-asana",

@@ -6,0 +6,0 @@ "authors": [

@@ -31,2 +31,3 @@

* @param {Object} [params] Parameters for the request
* @param {Object} [dispatchOptions] Options, if any, to pass the dispatcher for the request
* @return {Promise} The requested resource

@@ -36,7 +37,8 @@ */

attachment,
params
params,
dispatchOptions
) {
var path = util.format('/attachments/%d', attachment);
return this.dispatchGet(path, params);
return this.dispatchGet(path, params, dispatchOptions);
};

@@ -48,2 +50,3 @@

* @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

@@ -53,7 +56,8 @@ */

task,
params
params,
dispatchOptions
) {
var path = util.format('/tasks/%d/attachments', task);
return this.dispatchGetCollection(path, params);
return this.dispatchGetCollection(path, params, dispatchOptions);
};

@@ -60,0 +64,0 @@

@@ -44,14 +44,16 @@

* Returns the full record of the newly created project.
* @param {Object} [data] Data for the request
* @option {Number} workspace The workspace or organization to create the project in.
* @option {Number} [team] If creating in an organization, the specific team to create the
* @param {Object} data Data for the request
* @param {Number} data.workspace The workspace or organization to create the project in.
* @param {Number} [data.team] If creating in an organization, the specific team to create the
* project in.
* @param {Object} [dispatchOptions] Options, if any, to pass the dispatcher for the request
* @return {Promise} The response from the API
*/
Projects.prototype.create = function(
data
data,
dispatchOptions
) {
var path = util.format('/projects');
return this.dispatchPost(path, data);
return this.dispatchPost(path, data, dispatchOptions);
};

@@ -65,3 +67,4 @@

* @param {Number} workspace The workspace or organization to create the project in.
* @param {Object} [data] Data for the request
* @param {Object} data Data for the request
* @param {Object} [dispatchOptions] Options, if any, to pass the dispatcher for the request
* @return {Promise} The response from the API

@@ -71,7 +74,8 @@ */

workspace,
data
data,
dispatchOptions
) {
var path = util.format('/workspaces/%d/projects', workspace);
return this.dispatchPost(path, data);
return this.dispatchPost(path, data, dispatchOptions);
};

@@ -84,3 +88,4 @@

* @param {Number} team The team to create the project in.
* @param {Object} [data] Data for the request
* @param {Object} data Data for the request
* @param {Object} [dispatchOptions] Options, if any, to pass the dispatcher for the request
* @return {Promise} The response from the API

@@ -90,7 +95,8 @@ */

team,
data
data,
dispatchOptions
) {
var path = util.format('/teams/%d/projects', team);
return this.dispatchPost(path, data);
return this.dispatchPost(path, data, dispatchOptions);
};

@@ -102,2 +108,3 @@

* @param {Object} [params] Parameters for the request
* @param {Object} [dispatchOptions] Options, if any, to pass the dispatcher for the request
* @return {Promise} The requested resource

@@ -107,7 +114,8 @@ */

project,
params
params,
dispatchOptions
) {
var path = util.format('/projects/%d', project);
return this.dispatchGet(path, params);
return this.dispatchGet(path, params, dispatchOptions);
};

@@ -126,3 +134,4 @@

* @param {Number} project The project to update.
* @param {Object} [data] Data for the request
* @param {Object} data Data for the request
* @param {Object} [dispatchOptions] Options, if any, to pass the dispatcher for the request
* @return {Promise} The response from the API

@@ -132,7 +141,8 @@ */

project,
data
data,
dispatchOptions
) {
var path = util.format('/projects/%d', project);
return this.dispatchPut(path, data);
return this.dispatchPut(path, data, dispatchOptions);
};

@@ -146,10 +156,12 @@

* @param {Number} project The project to delete.
* @param {Object} [dispatchOptions] Options, if any, to pass the dispatcher for the request
* @return {Promise} The response from the API
*/
Projects.prototype.delete = function(
project
project,
dispatchOptions
) {
var path = util.format('/projects/%d', project);
return this.dispatchDelete(path);
return this.dispatchDelete(path, dispatchOptions);
};

@@ -161,14 +173,16 @@

* @param {Object} [params] Parameters for the request
* @option {Number} [workspace] The workspace or organization to filter projects on.
* @option {Number} [team] The team to filter projects on.
* @option {Boolean} [archived] Only return projects whose `archived` field takes on the value of
* @param {Number} [params.workspace] The workspace or organization to filter projects on.
* @param {Number} [params.team] The team to filter projects on.
* @param {Boolean} [params.archived] Only return projects whose `archived` field takes on the value of
* this parameter.
* @param {Object} [dispatchOptions] Options, if any, to pass the dispatcher for the request
* @return {Promise} The response from the API
*/
Projects.prototype.findAll = function(
params
params,
dispatchOptions
) {
var path = util.format('/projects');
return this.dispatchGetCollection(path, params);
return this.dispatchGetCollection(path, params, dispatchOptions);
};

@@ -180,4 +194,5 @@

* @param {Object} [params] Parameters for the request
* @option {Boolean} [archived] Only return projects whose `archived` field takes on the value of
* @param {Boolean} [params.archived] Only return projects whose `archived` field takes on the value of
* this parameter.
* @param {Object} [dispatchOptions] Options, if any, to pass the dispatcher for the request
* @return {Promise} The response from the API

@@ -187,7 +202,8 @@ */

workspace,
params
params,
dispatchOptions
) {
var path = util.format('/workspaces/%d/projects', workspace);
return this.dispatchGetCollection(path, params);
return this.dispatchGetCollection(path, params, dispatchOptions);
};

@@ -199,4 +215,5 @@

* @param {Object} [params] Parameters for the request
* @option {Boolean} [archived] Only return projects whose `archived` field takes on the value of
* @param {Boolean} [params.archived] Only return projects whose `archived` field takes on the value of
* this parameter.
* @param {Object} [dispatchOptions] Options, if any, to pass the dispatcher for the request
* @return {Promise} The response from the API

@@ -206,11 +223,47 @@ */

team,
params
params,
dispatchOptions
) {
var path = util.format('/teams/%d/projects', team);
return this.dispatchGetCollection(path, params);
return this.dispatchGetCollection(path, params, dispatchOptions);
};
/**
* Returns compact records for all sections in the specified project.
* @param {Number} project The project to get sections 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
*/
Projects.prototype.sections = function(
project,
params,
dispatchOptions
) {
var path = util.format('/projects/%d/sections', project);
return this.dispatchGetCollection(path, params, dispatchOptions);
};
/**
* Returns the compact task records for all tasks within the given project,
* ordered by their priority within the project. Tasks can exist in more than one project at a time.
* @param {Number} project The project in which to search for tasks.
* @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
*/
Projects.prototype.tasks = function(
project,
params,
dispatchOptions
) {
var path = util.format('/projects/%d/tasks', project);
return this.dispatchGetCollection(path, params, dispatchOptions);
};
module.exports = Projects;
/* jshint ignore:end */

@@ -33,4 +33,5 @@

* Returns the full record for a single story.
* @param {Number} story Globally unique identifier for the team.
* @param {Number} story Globally unique identifier for the story.
* @param {Object} [params] Parameters for the request
* @param {Object} [dispatchOptions] Options, if any, to pass the dispatcher for the request
* @return {Promise} The requested resource

@@ -40,7 +41,8 @@ */

story,
params
params,
dispatchOptions
) {
var path = util.format('/stories/%d', story);
return this.dispatchGet(path, params);
return this.dispatchGet(path, params, dispatchOptions);
};

@@ -52,2 +54,3 @@

* @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

@@ -57,7 +60,8 @@ */

task,
params
params,
dispatchOptions
) {
var path = util.format('/tasks/%d/stories', task);
return this.dispatchGetCollection(path, params);
return this.dispatchGetCollection(path, params, dispatchOptions);
};

@@ -72,4 +76,5 @@

* @param {Number} task Globally unique identifier for the task.
* @param {Object} [data] Data for the request
* @option {String} text The plain text of the comment to add.
* @param {Object} data Data for the request
* @param {String} data.text The plain text of the comment to add.
* @param {Object} [dispatchOptions] Options, if any, to pass the dispatcher for the request
* @return {Promise} The response from the API

@@ -79,7 +84,8 @@ */

task,
data
data,
dispatchOptions
) {
var path = util.format('/tasks/%d/stories', task);
return this.dispatchPost(path, data);
return this.dispatchPost(path, data, dispatchOptions);
};

@@ -86,0 +92,0 @@

@@ -40,12 +40,14 @@

* Returns the full record of the newly created tag.
* @param {Object} [data] Data for the request
* @option {Number} workspace The workspace or organization to create the tag in.
* @param {Object} data Data for the request
* @param {Number} data.workspace The workspace or organization to create the tag in.
* @param {Object} [dispatchOptions] Options, if any, to pass the dispatcher for the request
* @return {Promise} The response from the API
*/
Tags.prototype.create = function(
data
data,
dispatchOptions
) {
var path = util.format('/tags');
return this.dispatchPost(path, data);
return this.dispatchPost(path, data, dispatchOptions);
};

@@ -63,3 +65,4 @@

* @param {Number} workspace The workspace or organization to create the tag in.
* @param {Object} [data] Data for the request
* @param {Object} data Data for the request
* @param {Object} [dispatchOptions] Options, if any, to pass the dispatcher for the request
* @return {Promise} The response from the API

@@ -69,7 +72,8 @@ */

workspace,
data
data,
dispatchOptions
) {
var path = util.format('/workspaces/%d/tags', workspace);
return this.dispatchPost(path, data);
return this.dispatchPost(path, data, dispatchOptions);
};

@@ -81,2 +85,3 @@

* @param {Object} [params] Parameters for the request
* @param {Object} [dispatchOptions] Options, if any, to pass the dispatcher for the request
* @return {Promise} The requested resource

@@ -86,7 +91,8 @@ */

tag,
params
params,
dispatchOptions
) {
var path = util.format('/tags/%d', tag);
return this.dispatchGet(path, params);
return this.dispatchGet(path, params, dispatchOptions);
};

@@ -104,3 +110,4 @@

* @param {Number} tag The tag to update.
* @param {Object} [data] Data for the request
* @param {Object} data Data for the request
* @param {Object} [dispatchOptions] Options, if any, to pass the dispatcher for the request
* @return {Promise} The response from the API

@@ -110,7 +117,8 @@ */

tag,
data
data,
dispatchOptions
) {
var path = util.format('/tags/%d', tag);
return this.dispatchPut(path, data);
return this.dispatchPut(path, data, dispatchOptions);
};

@@ -124,10 +132,12 @@

* @param {Number} tag The tag to delete.
* @param {Object} [dispatchOptions] Options, if any, to pass the dispatcher for the request
* @return {Promise} The response from the API
*/
Tags.prototype.delete = function(
tag
tag,
dispatchOptions
) {
var path = util.format('/tags/%d', tag);
return this.dispatchDelete(path);
return this.dispatchDelete(path, dispatchOptions);
};

@@ -139,14 +149,16 @@

* @param {Object} [params] Parameters for the request
* @option {Number} [workspace] The workspace or organization to filter tags on.
* @option {Number} [team] The team to filter tags on.
* @option {Boolean} [archived] Only return tags whose `archived` field takes on the value of
* @param {Number} [params.workspace] The workspace or organization to filter tags on.
* @param {Number} [params.team] The team to filter tags on.
* @param {Boolean} [params.archived] Only return tags whose `archived` field takes on the value of
* this parameter.
* @param {Object} [dispatchOptions] Options, if any, to pass the dispatcher for the request
* @return {Promise} The response from the API
*/
Tags.prototype.findAll = function(
params
params,
dispatchOptions
) {
var path = util.format('/tags');
return this.dispatchGetCollection(path, params);
return this.dispatchGetCollection(path, params, dispatchOptions);
};

@@ -158,2 +170,3 @@

* @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

@@ -163,11 +176,30 @@ */

workspace,
params
params,
dispatchOptions
) {
var path = util.format('/workspaces/%d/tags', workspace);
return this.dispatchGetCollection(path, params);
return this.dispatchGetCollection(path, params, dispatchOptions);
};
/**
* Returns the compact task records for all tasks with the given tag.
* Tasks can have more than one tag at a time.
* @param {Number} 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/%d/tasks', tag);
return this.dispatchGetCollection(path, params, dispatchOptions);
};
module.exports = Tags;
/* jshint ignore:end */

@@ -36,11 +36,14 @@

* explicitly if you specify a `project` or a `parent` task instead.
* @param {Object} [data] Data for the request
* @param {Object} data Data for the request
* @param {Number} [data.workspace] The workspace to create a task in.
* @param {Object} [dispatchOptions] Options, if any, to pass the dispatcher for the request
* @return {Promise} The response from the API
*/
Tasks.prototype.create = function(
data
data,
dispatchOptions
) {
var path = util.format('/tasks');
return this.dispatchPost(path, data);
return this.dispatchPost(path, data, dispatchOptions);
};

@@ -55,5 +58,6 @@

* workspace cannot be changed once set. The workspace need not be set
* explicitly if you specify a project or a parent task instead.
* explicitly if you specify a `project` or a `parent` task instead.
* @param {Number} workspace The workspace to create a task in.
* @param {Object} [data] Data for the request
* @param {Object} data Data for the request
* @param {Object} [dispatchOptions] Options, if any, to pass the dispatcher for the request
* @return {Promise} The response from the API

@@ -63,7 +67,8 @@ */

workspace,
data
data,
dispatchOptions
) {
var path = util.format('/workspaces/%d/tasks', workspace);
return this.dispatchPost(path, data);
return this.dispatchPost(path, data, dispatchOptions);
};

@@ -75,2 +80,3 @@

* @param {Object} [params] Parameters for the request
* @param {Object} [dispatchOptions] Options, if any, to pass the dispatcher for the request
* @return {Promise} The requested resource

@@ -80,7 +86,8 @@ */

task,
params
params,
dispatchOptions
) {
var path = util.format('/tasks/%d', task);
return this.dispatchGet(path, params);
return this.dispatchGet(path, params, dispatchOptions);
};

@@ -99,3 +106,4 @@

* @param {Number} task The task to update.
* @param {Object} [data] Data for the request
* @param {Object} data Data for the request
* @param {Object} [dispatchOptions] Options, if any, to pass the dispatcher for the request
* @return {Promise} The response from the API

@@ -105,7 +113,8 @@ */

task,
data
data,
dispatchOptions
) {
var path = util.format('/tasks/%d', task);
return this.dispatchPut(path, data);
return this.dispatchPut(path, data, dispatchOptions);
};

@@ -121,10 +130,12 @@

* @param {Number} task The task to delete.
* @param {Object} [dispatchOptions] Options, if any, to pass the dispatcher for the request
* @return {Promise} The response from the API
*/
Tasks.prototype.delete = function(
task
task,
dispatchOptions
) {
var path = util.format('/tasks/%d', task);
return this.dispatchDelete(path);
return this.dispatchDelete(path, dispatchOptions);
};

@@ -137,2 +148,3 @@

* @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

@@ -142,7 +154,8 @@ */

projectId,
params
params,
dispatchOptions
) {
var path = util.format('/projects/%d/tasks', projectId);
return this.dispatchGetCollection(path, params);
return this.dispatchGetCollection(path, params, dispatchOptions);
};

@@ -154,2 +167,3 @@

* @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

@@ -159,7 +173,8 @@ */

tag,
params
params,
dispatchOptions
) {
var path = util.format('/tags/%d/tasks', tag);
return this.dispatchGetCollection(path, params);
return this.dispatchGetCollection(path, params, dispatchOptions);
};

@@ -171,15 +186,17 @@

* @param {Object} [params] Parameters for the request
* @option {Number} [assignee] The assignee to filter tasks on.
* @option {Number} [workspace] The workspace or organization to filter tasks on.
* @option {String} [completed_since] Only return tasks that are either incomplete or that have been
* @param {Number} [params.assignee] The assignee to filter tasks on.
* @param {Number} [params.workspace] The workspace or organization to filter tasks on.
* @param {String} [params.completed_since] Only return tasks that are either incomplete or that have been
* completed since this time.
* @option {String} [modified_since] Only return tasks that have been modified since the given time.
* @param {String} [params.modified_since] Only return tasks that have been modified since the given time.
* @param {Object} [dispatchOptions] Options, if any, to pass the dispatcher for the request
* @return {Promise} The response from the API
*/
Tasks.prototype.findAll = function(
params
params,
dispatchOptions
) {
var path = util.format('/tasks');
return this.dispatchGetCollection(path, params);
return this.dispatchGetCollection(path, params, dispatchOptions);
};

@@ -191,4 +208,5 @@

* @param {Number} task The task to add followers to.
* @param {Object} [data] Data for the request
* @option {Array} followers An array of followers to add to the task.
* @param {Object} data Data for the request
* @param {Array} data.followers An array of followers to add to the task.
* @param {Object} [dispatchOptions] Options, if any, to pass the dispatcher for the request
* @return {Promise} The response from the API

@@ -198,7 +216,8 @@ */

task,
data
data,
dispatchOptions
) {
var path = util.format('/tasks/%d/addFollowers', task);
return this.dispatchPost(path, data);
return this.dispatchPost(path, data, dispatchOptions);
};

@@ -210,4 +229,5 @@

* @param {Number} task The task to remove followers from.
* @param {Object} [data] Data for the request
* @option {Array} followers An array of followers to remove from the task.
* @param {Object} data Data for the request
* @param {Array} data.followers An array of followers to remove from the task.
* @param {Object} [dispatchOptions] Options, if any, to pass the dispatcher for the request
* @return {Promise} The response from the API

@@ -217,7 +237,8 @@ */

task,
data
data,
dispatchOptions
) {
var path = util.format('/tasks/%d/removeFollowers', task);
return this.dispatchPost(path, data);
return this.dispatchPost(path, data, dispatchOptions);
};

@@ -229,2 +250,3 @@

* @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

@@ -234,7 +256,8 @@ */

task,
params
params,
dispatchOptions
) {
var path = util.format('/tasks/%d/projects', task);
return this.dispatchGetCollection(path, params);
return this.dispatchGetCollection(path, params, dispatchOptions);
};

@@ -252,10 +275,11 @@

* @param {Number} task The task to add to a project.
* @param {Object} [data] Data for the request
* @option {Number} project The project to add the task to.
* @option {Number} [insertAfter] A task in the project to insert the task after, or `null` to
* @param {Object} data Data for the request
* @param {Number} data.project The project to add the task to.
* @param {Number} [data.insertAfter] A task in the project to insert the task after, or `null` to
* insert at the beginning of the list.
* @option {Number} [insertBefore] A task in the project to insert the task before, or `null` to
* @param {Number} [data.insertBefore] A task in the project to insert the task before, or `null` to
* insert at the end of the list.
* @option {Number} [section] A section in the project to insert the task into. The task will be
* @param {Number} [data.section] A section in the project to insert the task into. The task will be
* inserted at the top of the section.
* @param {Object} [dispatchOptions] Options, if any, to pass the dispatcher for the request
* @return {Promise} The response from the API

@@ -265,7 +289,8 @@ */

task,
data
data,
dispatchOptions
) {
var path = util.format('/tasks/%d/addProject', task);
return this.dispatchPost(path, data);
return this.dispatchPost(path, data, dispatchOptions);
};

@@ -279,4 +304,5 @@

* @param {Number} task The task to remove from a project.
* @param {Object} [data] Data for the request
* @option {Number} project The project to remove the task from.
* @param {Object} data Data for the request
* @param {Number} data.project The project to remove the task from.
* @param {Object} [dispatchOptions] Options, if any, to pass the dispatcher for the request
* @return {Promise} The response from the API

@@ -286,7 +312,8 @@ */

task,
data
data,
dispatchOptions
) {
var path = util.format('/tasks/%d/removeProject', task);
return this.dispatchPost(path, data);
return this.dispatchPost(path, data, dispatchOptions);
};

@@ -298,2 +325,3 @@

* @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

@@ -303,7 +331,8 @@ */

task,
params
params,
dispatchOptions
) {
var path = util.format('/tasks/%d/tags', task);
return this.dispatchGetCollection(path, params);
return this.dispatchGetCollection(path, params, dispatchOptions);
};

@@ -314,4 +343,5 @@

* @param {Number} task The task to add a tag to.
* @param {Object} [data] Data for the request
* @option {Number} tag The tag to add to the task.
* @param {Object} data Data for the request
* @param {Number} data.tag The tag to add to the task.
* @param {Object} [dispatchOptions] Options, if any, to pass the dispatcher for the request
* @return {Promise} The response from the API

@@ -321,7 +351,8 @@ */

task,
data
data,
dispatchOptions
) {
var path = util.format('/tasks/%d/addTag', task);
return this.dispatchPost(path, data);
return this.dispatchPost(path, data, dispatchOptions);
};

@@ -332,4 +363,5 @@

* @param {Number} task The task to remove a tag from.
* @param {Object} [data] Data for the request
* @option {Number} tag The tag to remove from the task.
* @param {Object} data Data for the request
* @param {Number} data.tag The tag to remove from the task.
* @param {Object} [dispatchOptions] Options, if any, to pass the dispatcher for the request
* @return {Promise} The response from the API

@@ -339,7 +371,8 @@ */

task,
data
data,
dispatchOptions
) {
var path = util.format('/tasks/%d/removeTag', task);
return this.dispatchPost(path, data);
return this.dispatchPost(path, data, dispatchOptions);
};

@@ -351,2 +384,3 @@

* @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

@@ -356,14 +390,16 @@ */

task,
params
params,
dispatchOptions
) {
var path = util.format('/tasks/%d/subtasks', task);
return this.dispatchGetCollection(path, params);
return this.dispatchGetCollection(path, params, dispatchOptions);
};
/**
* Makes an existing task a subtask of another. Returns an empty data block.
* Creates a new subtask and adds it to the parent task. Returns the full record
* for the newly created subtask.
* @param {Number} task The task to add a subtask to.
* @param {Object} [data] Data for the request
* @option {Number} subtask The subtask to add to the task.
* @param {Object} data Data for the request
* @param {Object} [dispatchOptions] Options, if any, to pass the dispatcher for the request
* @return {Promise} The response from the API

@@ -373,7 +409,8 @@ */

task,
data
data,
dispatchOptions
) {
var path = util.format('/tasks/%d/subtasks', task);
return this.dispatchPost(path, data);
return this.dispatchPost(path, data, dispatchOptions);
};

@@ -385,2 +422,3 @@

* @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

@@ -390,7 +428,8 @@ */

task,
params
params,
dispatchOptions
) {
var path = util.format('/tasks/%d/stories', task);
return this.dispatchGetCollection(path, params);
return this.dispatchGetCollection(path, params, dispatchOptions);
};

@@ -405,4 +444,5 @@

* @param {Number} task Globally unique identifier for the task.
* @param {Object} [data] Data for the request
* @option {String} text The plain text of the comment to add.
* @param {Object} data Data for the request
* @param {String} data.text The plain text of the comment to add.
* @param {Object} [dispatchOptions] Options, if any, to pass the dispatcher for the request
* @return {Promise} The response from the API

@@ -412,7 +452,8 @@ */

task,
data
data,
dispatchOptions
) {
var path = util.format('/tasks/%d/stories', task);
return this.dispatchPost(path, data);
return this.dispatchPost(path, data, dispatchOptions);
};

@@ -419,0 +460,0 @@

@@ -30,2 +30,3 @@

* @param {Object} [params] Parameters for the request
* @param {Object} [dispatchOptions] Options, if any, to pass the dispatcher for the request
* @return {Promise} The requested resource

@@ -35,7 +36,8 @@ */

team,
params
params,
dispatchOptions
) {
var path = util.format('/teams/%d', team);
return this.dispatchGet(path, params);
return this.dispatchGet(path, params, dispatchOptions);
};

@@ -48,2 +50,3 @@

* @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

@@ -53,7 +56,8 @@ */

organization,
params
params,
dispatchOptions
) {
var path = util.format('/organizations/%d/teams', organization);
return this.dispatchGetCollection(path, params);
return this.dispatchGetCollection(path, params, dispatchOptions);
};

@@ -65,2 +69,3 @@

* @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

@@ -70,7 +75,8 @@ */

team,
params
params,
dispatchOptions
) {
var path = util.format('/teams/%d/users', team);
return this.dispatchGetCollection(path, params);
return this.dispatchGetCollection(path, params, dispatchOptions);
};

@@ -77,0 +83,0 @@

@@ -33,16 +33,19 @@

* @param {Object} [params] Parameters for the request
* @param {Object} [dispatchOptions] Options, if any, to pass the dispatcher for the request
* @return {Promise} The requested resource
*/
Users.prototype.me = function(
params
params,
dispatchOptions
) {
var path = util.format('/users/me');
return this.dispatchGet(path, params);
return this.dispatchGet(path, params, dispatchOptions);
};
/**
* Returns the full user record for a single user.
* Returns the full user record for the single user with the provided ID.
* @param {Number} user Globally unique identifier for the user.
* @param {Object} [params] Parameters for the request
* @param {Object} [dispatchOptions] Options, if any, to pass the dispatcher for the request
* @return {Promise} The requested resource

@@ -52,14 +55,16 @@ */

user,
params
params,
dispatchOptions
) {
var path = util.format('/users/%d', user);
return this.dispatchGet(path, params);
return this.dispatchGet(path, params, dispatchOptions);
};
/**
* Returns the user records for all users in all workspaces and organizations
* accessible to the authenticated user.
* Returns the user records for all users in the specified workspace or
* organization.
* @param {Number} workspace The workspace in which to get users.
* @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

@@ -69,22 +74,26 @@ */

workspace,
params
params,
dispatchOptions
) {
var path = util.format('/workspaces/%d/users', workspace);
return this.dispatchGetCollection(path, params);
return this.dispatchGetCollection(path, params, dispatchOptions);
};
/**
* Returns the user records for all users in the specified workspace or
* organization.
* Returns the user records for all users in all workspaces and organizations
* accessible to the authenticated user. Accepts an optional workspace ID
* parameter.
* @param {Object} [params] Parameters for the request
* @option {Number} [workspace] The workspace or organization to filter users on.
* @param {Number} [params.workspace] The workspace or organization to filter users on.
* @param {Object} [dispatchOptions] Options, if any, to pass the dispatcher for the request
* @return {Promise} The response from the API
*/
Users.prototype.findAll = function(
params
params,
dispatchOptions
) {
var path = util.format('/users');
return this.dispatchGetCollection(path, params);
return this.dispatchGetCollection(path, params, dispatchOptions);
};

@@ -91,0 +100,0 @@

@@ -42,2 +42,3 @@

* @param {Object} [params] Parameters for the request
* @param {Object} [dispatchOptions] Options, if any, to pass the dispatcher for the request
* @return {Promise} The requested resource

@@ -47,7 +48,8 @@ */

workspace,
params
params,
dispatchOptions
) {
var path = util.format('/workspaces/%d', workspace);
return this.dispatchGet(path, params);
return this.dispatchGet(path, params, dispatchOptions);
};

@@ -58,16 +60,25 @@

* @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
*/
Workspaces.prototype.findAll = function(
params
params,
dispatchOptions
) {
var path = util.format('/workspaces');
return this.dispatchGetCollection(path, params);
return this.dispatchGetCollection(path, params, dispatchOptions);
};
/**
* Update properties on a workspace. Returns the complete, updated workspace record.
* A specific, existing workspace can be updated by making a PUT request on
* the URL for that workspace. Only the fields provided in the data block
* will be updated; any unspecified fields will remain unchanged.
*
* Currently the only field that can be modified for a workspace is its `name`.
*
* Returns the complete, updated workspace record.
* @param {Number} workspace The workspace to update.
* @param {Object} [data] Data for the request
* @param {Object} data Data for the request
* @param {Object} [dispatchOptions] Options, if any, to pass the dispatcher for the request
* @return {Promise} The response from the API

@@ -77,7 +88,8 @@ */

workspace,
data
data,
dispatchOptions
) {
var path = util.format('/workspaces/%d', workspace);
return this.dispatchPut(path, data);
return this.dispatchPut(path, data, dispatchOptions);
};

@@ -93,11 +105,12 @@

* @param {Object} [params] Parameters for the request
* @option {String} type The type of values the typeahead should return.
* @param {String} params.type The type of values the typeahead should return.
* 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.
* @option {String} [query] The string that will be used to search for relevant objects. If an
* @param {String} [params.query] 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.
* @option {Number} [count] The number of results to return. The default is `20` if this
* @param {Number} [params.count] 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.
* @param {Object} [dispatchOptions] Options, if any, to pass the dispatcher for the request
* @return {Promise} The response from the API

@@ -107,7 +120,8 @@ */

workspace,
params
params,
dispatchOptions
) {
var path = util.format('/workspaces/%d/typeahead', workspace);
return this.dispatchGetCollection(path, params);
return this.dispatchGetCollection(path, params, dispatchOptions);
};

@@ -114,0 +128,0 @@

{
"name": "asana",
"version": "0.9.1",
"version": "0.9.2",
"description": "Official NodeJS and BrowserJS client for the Asana API",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -1,2 +0,2 @@

# Asana [![GitHub release](https://img.shields.io/github/release/asana/node-asana.svg)]() [![Build Status][travis-image]][travis-url] [![NPM Version][npm-image]][npm-url]
# Asana [![GitHub release][release-image]]() [![Build Status][travis-image]][travis-url] [![NPM Version][npm-image]][npm-url]

@@ -54,3 +54,3 @@ A JavaScript client (for both Node and browser) for the Asana API v1.0.

var client = asana.Client.create().useBasicAuth('my_api_key');
client.workspaces.me().then(function(me) {
client.users.me().then(function(me) {
console.log(me);

@@ -250,4 +250,6 @@ });

[release-image]: https://img.shields.io/github/release/asana/node-asana.svg
[travis-url]: http://travis-ci.org/Asana/node-asana
[travis-image]: http://img.shields.io/travis/Asana/node-asana.svg?style=flat-square
[travis-image]: http://img.shields.io/travis/Asana/node-asana.svg?style=flat-square&branch=master

@@ -254,0 +256,0 @@ [npm-url]: https://www.npmjs.org/package/asana

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc