getTasks method
Future<MultiEntityResult<Task> >
getTasks({
- String? bodyFormat,
- bool? includeBlankTasks,
- String? status,
- List<
int> ? taskId, - List<
int> ? spaceId, - List<
int> ? pageId, - List<
int> ? blogpostId, - List<
String> ? createdBy, - List<
String> ? assignedTo, - List<
String> ? completedBy, - int? createdAtFrom,
- int? createdAtTo,
- int? dueAtFrom,
- int? dueAtTo,
- int? completedAtFrom,
- int? completedAtTo,
- String? cursor,
- int? limit,
Returns all tasks. The number of results is limited by the limit
parameter and additional results (if available)
will be available through the next
URL present in the Link
response
header.
Permissions required: Permission to access the Confluence site ('Can use' global permission). Only tasks that the user has permission to view will be returned.
Implementation
Future<MultiEntityResult<Task>> getTasks(
{String? bodyFormat,
bool? includeBlankTasks,
String? status,
List<int>? taskId,
List<int>? spaceId,
List<int>? pageId,
List<int>? blogpostId,
List<String>? createdBy,
List<String>? assignedTo,
List<String>? completedBy,
int? createdAtFrom,
int? createdAtTo,
int? dueAtFrom,
int? dueAtTo,
int? completedAtFrom,
int? completedAtTo,
String? cursor,
int? limit}) async {
return MultiEntityResult.fromJson(
await _client.send(
'get',
'tasks',
queryParameters: {
if (bodyFormat != null) 'body-format': bodyFormat,
if (includeBlankTasks != null)
'include-blank-tasks': '$includeBlankTasks',
if (status != null) 'status': status,
if (taskId != null) 'task-id': taskId.map((e) => '$e').join(','),
if (spaceId != null) 'space-id': spaceId.map((e) => '$e').join(','),
if (pageId != null) 'page-id': pageId.map((e) => '$e').join(','),
if (blogpostId != null)
'blogpost-id': blogpostId.map((e) => '$e').join(','),
if (createdBy != null)
'created-by': createdBy.map((e) => e).join(','),
if (assignedTo != null)
'assigned-to': assignedTo.map((e) => e).join(','),
if (completedBy != null)
'completed-by': completedBy.map((e) => e).join(','),
if (createdAtFrom != null) 'created-at-from': '$createdAtFrom',
if (createdAtTo != null) 'created-at-to': '$createdAtTo',
if (dueAtFrom != null) 'due-at-from': '$dueAtFrom',
if (dueAtTo != null) 'due-at-to': '$dueAtTo',
if (completedAtFrom != null) 'completed-at-from': '$completedAtFrom',
if (completedAtTo != null) 'completed-at-to': '$completedAtTo',
if (cursor != null) 'cursor': cursor,
if (limit != null) 'limit': '$limit',
},
),
reviver: (v) => Task.fromJson(v as Map<String, Object?>),
);
}