Socket
Socket
Sign inDemoInstall

asana

Package Overview
Dependencies
48
Maintainers
1
Versions
87
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.1.2 to 0.2.0

77

lib/resources/tasks.js

@@ -59,3 +59,3 @@ var util = require('util');

Tasks.prototype.findByProject = function(projectId, params) {
var path = util.format('/projects/%d/tasks', projectId);
var path = util.format('/projects/%d/tasks', projectId);
return this.dispatcher.get(path, params);

@@ -71,3 +71,3 @@ };

Tasks.prototype.findByTag = function(tagId, params) {
var path = util.format('/tags/%d/tasks', tagId);
var path = util.format('/tags/%d/tasks', tagId);
return this.dispatcher.get(path, params);

@@ -113,3 +113,42 @@ };

* @param {Object} data The data containing the list of followers
};
/**
* Update a task
* @param {Number} taskId The task id
* @param {Object} data The data to be sent to the workspace
* @return {Promise} The result of the API call
*/
Tasks.prototype.update = function(taskId, data) {
var path = util.format('/tasks/%d', taskId);
return this.dispatcher.put(path, data);
};
/**
* Deletes a task
* @param {Number} taskId The task id
* @return {Promise} The result of the API call
*/
Tasks.prototype.delete = function(taskId) {
var path = util.format('/tasks/%d', taskId);
return this.dispatcher.delete(path);
};
/**
* Dispatches a POST request to /tasks/:taskId/addFollowers with to add
* followers to the task.
* @param {Number} taskId The task id
* @param {Object} data The data containing the list of followers
*/
Tasks.prototype.addFollowers = function(taskId, data) {
var path = util.format('/tasks/%d/addFollowers', taskId);
return this.dispatcher.post(path, data);
};
/**
* Dispatches a POST request to /tasks/:taskId/removeFollowers with to remove
* followers from the task.
* @param {Number} taskId The task id
* @param {Object} data The data containing the list of followers
*/
Tasks.prototype.removeFollowers = function(taskId, data) {

@@ -120,2 +159,36 @@ var path = util.format('/tasks/%d/removeFollowers', taskId);

/**
* Dispatches a GET request to /tasks/:taskId/projects
* @param {Number} taskId The task id
* @return {Promise} The result of the API call
*/
Tasks.prototype.getProjects = function(taskId) {
var path = util.format('/tasks/%d/projects', taskId);
return this.dispatcher.get(path, undefined);
};
/**
* Dispatches a POST request to /tasks/:taskId/addProject with the project to
* add to to the task.
* @param {Number} taskId The task id
* @param {Number} data The data containing the projectId
* @return {Promise} The result of the API call
*/
Tasks.prototype.addProject = function(taskId, data) {
var path = util.format('/tasks/%d/addProject', taskId);
return this.dispatcher.post(path, data);
};
/**
* Dispatches a POST request to /tasks/:taskId/removeProject with the project to
* remove from the task
* @param {Number} taskId The task id
* @param {Object} data The data containing the list of followers
* @return {Promise} The result of the API call
*/
Tasks.prototype.removeProject = function(taskId, data) {
var path = util.format('/tasks/%d/removeProject', taskId);
return this.dispatcher.post(path, data);
};
module.exports = Tasks;

2

package.json
{
"name": "asana",
"version": "0.1.2",
"version": "0.2.0",
"description": "A node.js client for the Asana API",

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

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