Passer au contenu principal

asana@2.1.5

Functions

execute(operations)Operation

Execute a sequence of operations. Wraps language-common/execute, and prepends initial state for http.

getTask(task_gid, params, callback)Operation

Get a single task of a given project.

getTasks(project_gid, params, callback)Operation

Get the list of tasks for a given project.

updateTask(task_gid, params, callback)Operation

Update a specific task.

createTask(params, callback)Operation

Create a task.

upsertTask(project_gid, params, callback)Operation

Update or create a task.

execute(operations) ⇒ Operation

Execute a sequence of operations. Wraps language-common/execute, and prepends initial state for http.

Kind: global function

ParamTypeDescription
operationsOperationsOperations to be performed.

Example

execute(
create('foo'),
delete('bar')
)(state)

getTask(task_gid, params, callback) ⇒ Operation

Get a single task of a given project.

Kind: global function
Access: public

ParamTypeDescription
task_gidstringGlobally unique identifier for the task
paramsobjectQuery params to include.
callbackfunction(Optional) callback function

Example

getTask("task_gid",
{
opt_fields: "name,notes,assignee"
})

getTasks(project_gid, params, callback) ⇒ Operation

Get the list of tasks for a given project.

Kind: global function
Access: public

ParamTypeDescription
project_gidstringGlobally unique identifier for the project
paramsobjectQuery params to include.
callbackfunction(Optional) callback function

Example

getTasks("project_gid",
{
opt_fields: "name,notes,assignee"
})

updateTask(task_gid, params, callback) ⇒ Operation

Update a specific task.

Kind: global function
Access: public

ParamTypeDescription
task_gidstringGlobally unique identifier for the task
paramsobjectBody parameters
callbackfunction(Optional) callback function

Example

updateTask("task_gid",
{
name: 'test', "approval_status": "pending", "assignee": "12345"
}
)

createTask(params, callback) ⇒ Operation

Create a task.

Kind: global function
Access: public

ParamTypeDescription
paramsobjectBody parameters
callbackfunction(Optional) callback function

Example

createTask(
{
name: 'test', "approval_status": "pending", "assignee": "12345"
}
)

upsertTask(project_gid, params, callback) ⇒ Operation

Update or create a task.

Kind: global function
Access: public

ParamTypeDescription
project_gidstringGlobally unique identifier for the project
paramsobjectan object with an externalId and some task data.
callbackfunction(Optional) callback function

Example

upsertTask(
"1201382240880",
{
"externalId": "name",
"data": {
name: 'test', "approval_status": "pending", "assignee": "12345"
}

}
)