Class: AvatarClient

AvatarClient

Constructor

new AvatarClient(jiraClient)

Used to access Jira REST endpoints in '/rest/api/2/avatar'

Parameters:
Name Type Description
jiraClient JiraClient
Source:

Methods

createTemporaryAvatar(opts, callback)

Creates a temporary avatar. This function doesn't seem to work the way the Jira API describes, so for now just don't use it.

Parameters:
Name Type Description
opts

The options to be used in the API request.

Properties
Name Type Description
avatarType

The avatar type. May be 'project' or 'user'.

avatarFilename

The name of the file being uploaded

avatarFileSize

The size of the file

avatarFilePath

The path to the avatar file.

callback

Called when the avatar is created.

Source:

cropTemporaryAvatar(opts, callback)

Updates the cropping instructions of the temporary avatar. This function doesn't seem to work the way the Jira API describes, so for now just don't use it.

Parameters:
Name Type Description
opts Object

The options to be used in the API request.

Properties
Name Type Description
avatarType string

The avatar type. May be 'project' or 'user'.

crop Object

See https://docs.atlassian.com/jira/REST/latest/#d2e3316

callback

Called when the avatar has been cropped.

Source:

getAvatars(opts, callback)

Returns all system avatars of the given type.

Parameters:
Name Type Description
opts

The options to be used in the API request.

Properties
Name Type Description
avatarType

The avatar type. May be 'project' or 'user'.

callback

Called when the avatars are retrieved.

Source: