getTaskById method

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

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,
    bool? serializeIdsAsStrings}) async {
  return Task.fromJson(await _client.send(
    'get',
    'tasks/{id}',
    pathParameters: {
      'id': '$id',
    },
    queryParameters: {
      if (bodyFormat != null) 'body-format': bodyFormat,
      if (serializeIdsAsStrings != null)
        'serialize-ids-as-strings': '$serializeIdsAsStrings',
    },
  ));
}