public class TasksClient extends AbstractClient
apiKey, BASE_URL, service| Constructor and Description |
|---|
TasksClient(String apiKey) |
TasksClient(String apiKey,
int connectionTimeout,
int readTimeout) |
| Modifier and Type | Method and Description |
|---|---|
void |
addProject(long taskId,
long projectId)
Associate the given task with the given project.
|
void |
addProject(long taskId,
long projectId,
long insertId,
boolean insertBefore)
Associate the given task with the given project
|
void |
addTag(long taskId,
long tagId)
Add a tag to a task
|
Story |
createStory(long taskId,
String text)
Add a story (comment) to a task
|
Task |
createTask(TaskRequestBuilder builder) |
void |
deleteTask(long taskId) |
Projects |
getProjects(long taskId)
Retrieve the projects with which this task is associated
|
Stories |
getStories(long taskId)
Retrieve stories (comments) associated with the given task
|
Tasks |
getSubtasks(long taskId)
Retrieve all subtasks associated with the given parent task
|
Tags |
getTags(long taskId)
Retrieve all tags associated with the given task
|
Task |
getTask(long taskId) |
Tasks |
getTasks() |
Tasks |
getTasks(boolean includeArchived) |
void |
removeProject(long taskId,
long projectId)
Remove an association between the given task and project
|
void |
removeTag(long taskId,
long tagId)
Remove a tag from a task
|
Task |
updateTask(long taskId,
TaskRequestBuilder builder) |
public TasksClient(String apiKey)
public TasksClient(String apiKey, int connectionTimeout, int readTimeout)
apiKey - your Asana API keyconnectionTimeout - the connection timeout in MILLISECONDSreadTimeout - the read timeout in MILLISECONDSpublic Task createTask(TaskRequestBuilder builder)
public Task updateTask(long taskId, TaskRequestBuilder builder)
public void deleteTask(long taskId)
public Task getTask(long taskId)
public Tasks getTasks()
public Tasks getTasks(boolean includeArchived)
public Tasks getSubtasks(long taskId)
taskId - id of the parent task for which to retrieve subtaskspublic Stories getStories(long taskId)
taskId - the id of the task for which to retrieve storiespublic Story createStory(long taskId, String text)
taskId - the id with which to associate the new storytext - the text content of the storypublic Projects getProjects(long taskId)
taskId - the id of the task for which to retrieve associated projectspublic void addProject(long taskId,
long projectId,
long insertId,
boolean insertBefore)
taskId - the id of the taskprojectId - the id of the projectinsertId - the id of the project next to which to insert the project to be added. null for beginning / end
of the listinsertBefore - true to insert before insertId or at the end of the list if insertId is null; false to
insert after insertId or at the beginning of the list if insertId is nullpublic void addProject(long taskId,
long projectId)
taskId - the id of the taskprojectId - the id of the projectpublic void removeProject(long taskId,
long projectId)
taskId - the id of the taskprojectId - the id of the projectpublic Tags getTags(long taskId)
taskId - the id of the taskpublic void addTag(long taskId,
long tagId)
taskId - the id of the tasktagId - the id of the tagpublic void removeTag(long taskId,
long tagId)
taskId - the id of the tasktagId - the id of the tagCopyright © 2016. All rights reserved.