getPageById method

Future<PageSingle> getPageById({
  1. required int id,
  2. String? bodyFormat,
  3. bool? getDraft,
  4. int? version,
})

Returns a specific page.

Permissions required: Permission to view the page and its corresponding space.

Implementation

Future<PageSingle> getPageById(
    {required int id,
    String? bodyFormat,
    bool? getDraft,
    int? version}) async {
  return PageSingle.fromJson(await _client.send(
    'get',
    'pages/{id}',
    pathParameters: {
      'id': '$id',
    },
    queryParameters: {
      if (bodyFormat != null) 'body-format': bodyFormat,
      if (getDraft != null) 'get-draft': '$getDraft',
      if (version != null) 'version': '$version',
    },
  ));
}