getBlogPostsInSpace method

Future<MultiEntityResult<BlogPostBulk>> getBlogPostsInSpace({
  1. required int id,
  2. String? sort,
  3. List<String>? status,
  4. String? title,
  5. String? bodyFormat,
  6. String? cursor,
  7. int? limit,
})

Returns all blog posts in a space. The number of results is limited by the limit parameter and additional results (if available) will be available through the next URL present in the Link response header.

Permissions required: Permission to access the Confluence site ('Can use' global permission) and view the space. Only blog posts that the user has permission to view will be returned.

Implementation

Future<MultiEntityResult<BlogPostBulk>> getBlogPostsInSpace(
    {required int id,
    String? sort,
    List<String>? status,
    String? title,
    String? bodyFormat,
    String? cursor,
    int? limit}) async {
  return MultiEntityResult.fromJson(
    await _client.send(
      'get',
      'spaces/{id}/blogposts',
      pathParameters: {
        'id': '$id',
      },
      queryParameters: {
        if (sort != null) 'sort': sort,
        if (status != null) 'status': status.map((e) => e).join(','),
        if (title != null) 'title': title,
        if (bodyFormat != null) 'body-format': bodyFormat,
        if (cursor != null) 'cursor': cursor,
        if (limit != null) 'limit': '$limit',
      },
    ),
    reviver: (v) => BlogPostBulk.fromJson(v as Map<String, Object?>),
  );
}