Skip to main content

asana@2.1.2

Adaptor

Adaptor.execute(operations) ⇒ Operation

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

Kind: static method of Adaptor

ParamTypeDescription
operationsOperationsOperations to be performed.

Example

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

Adaptor.getTask(task_gid, params, callback) ⇒ Operation

Get a single task of a given project.

Kind: static method of Adaptor
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"
})

Adaptor.getTasks(project_gid, params, callback) ⇒ Operation

Get the list of tasks for a given project.

Kind: static method of Adaptor
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"
})

Adaptor.updateTask(task_gid, params, callback) ⇒ Operation

Update a specific task.

Kind: static method of Adaptor
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"
}
)

Adaptor.createTask(params, callback) ⇒ Operation

Create a task.

Kind: static method of Adaptor
Access: public

ParamTypeDescription
paramsobjectBody parameters
callbackfunction(Optional) callback function

Example

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

Adaptor.upsertTask(project_gid, params, callback) ⇒ Operation

Update or create a task.

Kind: static method of Adaptor
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"
}

}
)