createPageProperty method

Future<ContentProperty> createPageProperty({
  1. required int pageId,
  2. bool? serializeIdsAsStrings,
  3. required ContentPropertyCreateRequest body,
})

Creates a new content property for a page.

Permissions required: Permission to update the page.

Implementation

Future<ContentProperty> createPageProperty(
    {required int pageId,
    bool? serializeIdsAsStrings,
    required ContentPropertyCreateRequest body}) async {
  return ContentProperty.fromJson(await _client.send(
    'post',
    'pages/{page-id}/properties',
    pathParameters: {
      'page-id': '$pageId',
    },
    queryParameters: {
      if (serializeIdsAsStrings != null)
        'serialize-ids-as-strings': '$serializeIdsAsStrings',
    },
    body: body.toJson(),
  ));
}