getAttachments method

  1. @deprecated
Future<ContentArray> getAttachments({
  1. required String id,
  2. List<String>? expand,
  3. int? start,
  4. int? limit,
  5. String? filename,
  6. String? mediaType,
})

Deprecated, use Confluence's v2 API.

Returns the attachments for a piece of content.

By default, the following objects are expanded: metadata.

Permissions required: Permission to view the content. If the content is a blog post, 'View' permission for the space is required.

Implementation

@deprecated
Future<ContentArray> getAttachments(
    {required String id,
    List<String>? expand,
    int? start,
    int? limit,
    String? filename,
    String? mediaType}) async {
  return ContentArray.fromJson(await _client.send(
    'get',
    'wiki/rest/api/content/{id}/child/attachment',
    pathParameters: {
      'id': id,
    },
    queryParameters: {
      if (expand != null) 'expand': expand.map((e) => e).join(','),
      if (start != null) 'start': '$start',
      if (limit != null) 'limit': '$limit',
      if (filename != null) 'filename': filename,
      if (mediaType != null) 'mediaType': mediaType,
    },
  ));
}