Package ch.aaap.harvestclient.api
Interface TasksApi
- All Superinterfaces:
Api.Create<Task>
,Api.Delete<Task>
,Api.Get<Task>
,Api.Simple<Task>
- All Known Implementing Classes:
TasksApiImpl
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionCreate a new Task.void
Delete an existing Task.Return an existing Task.list
(TaskFilter filter) list
(TaskFilter filter, int page, int perPage) update
(Reference<Task> taskReference, TaskUpdateInfo toChange) Updates the specific task by setting the values of the parameters passed.
-
Method Details
-
list
- Parameters:
filter
- filtering options- Returns:
- a list of all Tasks in the account, sorted by creation date, newest first.
-
list
- Parameters:
filter
- filtering optionspage
- the page numberperPage
- how many results to return for one page. Max 100- Returns:
- a list of all Tasks in the account, sorted by creation date, newest first.
-
get
Return an existing Task. -
create
Create a new Task. Example:Task task = harvest.tasks().create(ImmutableTask.builder() .name("task name") .build());
- Specified by:
create
in interfaceApi.Create<Task>
- Parameters:
creationInfo
- creation information- Returns:
- the created Task
-
update
Updates the specific task by setting the values of the parameters passed. Any parameters not provided will be left unchanged- Parameters:
taskReference
- An existing Task to be updatedtoChange
- the changes to be performed- Returns:
- the updated Task
-
delete
Delete an existing Task. Only possible if no time entries are associated with it- Specified by:
delete
in interfaceApi.Delete<Task>
- Parameters:
taskReference
- a reference to the Task to be deleted
-