createBlogPost method

Future<BlogPostSingle> createBlogPost({
  1. bool? serializeIdsAsStrings,
  2. bool? private,
})

Creates a new blog post in the space specified by the spaceId.

By default this will create the blog post as a non-draft, unless the status is specified as draft. If creating a non-draft, the title must not be empty.

Currently only supports the storage representation specified in the body.representation enums below

Implementation

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