getAvatarImageByOwner method

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

Returns the avatar image for a project or issue type.

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> getAvatarImageByOwner(
    {required String type,
    required String entityId,
    String? size,
    String? format}) async {
  await _client.send(
    'get',
    'rest/api/3/universal_avatar/view/type/{type}/owner/{entityId}',
    pathParameters: {
      'type': type,
      'entityId': entityId,
    },
    queryParameters: {
      if (size != null) 'size': size,
      if (format != null) 'format': format,
    },
  );
}