getBlogpostAttachments method
Returns the attachments of specific blog post. 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 view the content of the blog post and its corresponding space.
Implementation
Future<MultiEntityResult<Attachment>> getBlogpostAttachments(
{required int id,
String? sort,
String? cursor,
List<String>? status,
String? mediaType,
String? filename,
int? limit}) async {
return MultiEntityResult.fromJson(
await _client.send(
'get',
'blogposts/{id}/attachments',
pathParameters: {
'id': '$id',
},
queryParameters: {
if (sort != null) 'sort': sort,
if (cursor != null) 'cursor': cursor,
if (status != null) 'status': status.map((e) => e).join(','),
if (mediaType != null) 'mediaType': mediaType,
if (filename != null) 'filename': filename,
if (limit != null) 'limit': '$limit',
},
),
reviver: (v) => Attachment.fromJson(v as Map<String, Object?>),
);
}