getAvatarImageByID method

Future<void> getAvatarImageByID({
  1. required String type,
  2. required int id,
  3. String? size,
  4. String? format,
})

Returns a project or issue type avatar image by ID.

This operation can be accessed anonymously.

Permissions required:

  • For system avatars, none.
  • For custom project avatars, Browse projects project permission for the project the avatar belongs to.
  • For custom issue type avatars, Browse projects project permission for at least one project the issue type is used in.

Implementation

Future<void> getAvatarImageByID(
    {required String type,
    required int id,
    String? size,
    String? format}) async {
  await _client.send(
    'get',
    'rest/api/3/universal_avatar/view/type/{type}/avatar/{id}',
    pathParameters: {
      'type': type,
      'id': '$id',
    },
    queryParameters: {
      if (size != null) 'size': size,
      if (format != null) 'format': format,
    },
  );
}