getTaskById method

Future<Task> getTaskById({
  1. required int id,
  2. String? bodyFormat,
})

Returns a specific task.

Permissions required: Permission to view the containing page or blog post and its corresponding space.

Implementation

Future<Task> getTaskById({required int id, String? bodyFormat}) async {
  return Task.fromJson(await _client.send(
    'get',
    'tasks/{id}',
    pathParameters: {
      'id': '$id',
    },
    queryParameters: {
      if (bodyFormat != null) 'body-format': bodyFormat,
    },
  ));
}