getLabelAttachments method
Returns the attachments of specified label. 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 attachment and its corresponding space.
Implementation
Future<MultiEntityResult<Attachment>> getLabelAttachments(
{required int id,
String? sort,
String? cursor,
int? limit,
bool? serializeIdsAsStrings}) async {
return MultiEntityResult.fromJson(
await _client.send(
'get',
'labels/{id}/attachments',
pathParameters: {
'id': '$id',
},
queryParameters: {
if (sort != null) 'sort': sort,
if (cursor != null) 'cursor': cursor,
if (limit != null) 'limit': '$limit',
if (serializeIdsAsStrings != null)
'serialize-ids-as-strings': '$serializeIdsAsStrings',
},
),
reviver: (v) => Attachment.fromJson(v as Map<String, Object?>),
);
}