createPage method

Future<PageSingle> createPage({
  1. bool? serializeIdsAsStrings,
  2. bool? embedded,
  3. bool? private,
})

Creates a page in the space.

Pages are created as published by default unless specified as a draft in the status field. If creating a published page, the title must be specified.

Permissions required: Permission to view the corresponding space. Permission to create a page in the space.

Implementation

Future<PageSingle> createPage(
    {bool? serializeIdsAsStrings, bool? embedded, bool? private}) async {
  return PageSingle.fromJson(await _client.send(
    'post',
    'pages',
    queryParameters: {
      if (serializeIdsAsStrings != null)
        'serialize-ids-as-strings': '$serializeIdsAsStrings',
      if (embedded != null) 'embedded': '$embedded',
      if (private != null) 'private': '$private',
    },
  ));
}