convertContentBody method
Converts a content body from one format to another format.
Supported conversions:
- storage: view, export_view, styled_view, editor
- editor: storage
- view: none
- export_view: none
- styled_view: none
Permissions required: If request specifies 'contentIdContext', 'View' permission for the space, and permission to view the content.
Implementation
Future<ContentBody> convertContentBody(
{required String to,
String? spaceKeyContext,
String? contentIdContext,
String? embeddedContentRender,
List<String>? expand,
required ContentBodyCreate body}) async {
return ContentBody.fromJson(await _client.send(
'post',
'wiki/rest/api/contentbody/convert/{to}',
pathParameters: {
'to': to,
},
queryParameters: {
if (spaceKeyContext != null) 'spaceKeyContext': spaceKeyContext,
if (contentIdContext != null) 'contentIdContext': contentIdContext,
if (embeddedContentRender != null)
'embeddedContentRender': embeddedContentRender,
if (expand != null) 'expand': expand.map((e) => e).join(','),
},
body: body.toJson(),
));
}