Newer Version Available

This content describes an older version of this product. View Latest

EmployeeProfiles Class

Get, set and crop, and delete employee banner photos and photos.

Namespace

ConnectApi

EmployeeProfiles Methods

These methods are for EmployeeProfiles. All methods are static.

deleteBannerPhoto(employeeId)

Delete an employee’s banner photo.

API Version

51.0

Requires Chatter

No

Signature

public static Void deleteBannerPhoto(String employeeId)

Parameters

employeeId
Type: String
ID of the employee.

Return Value

Type: Void

deletePhoto(employeeId)

Delete an employee’s photo.

API Version

51.0

Requires Chatter

No

Signature

public static Void deletePhoto(String employeeId)

Parameters

employeeId
Type: String
ID of the employee.

Return Value

Type: Void

getBannerPhoto(employeeId)

Get an employee’s banner photo.

API Version

51.0

Requires Chatter

No

Signature

public static ConnectApi.BannerPhoto getBannerPhoto(String employeeId)

Parameters

employeeId
Type: String
ID of the employee.

Return Value

Type: ConnectApi.BannerPhoto

getPhoto(employeeId)

Get an employee’s photo.

API Version

51.0

Available to Guest Users

51.0

Requires Chatter

No

Signature

public static ConnectApi.Photo getPhoto(String employeeId)

Parameters

employeeId
Type: String
ID of the employee.

Return Value

Type: ConnectApi.Photo

setBannerPhoto(employeeId, fileId, versionNumber)

Set an uploaded file as an employee’s banner photo.

API Version

51.0

Requires Chatter

No

Signature

public static ConnectApi.BannerPhoto setBannerPhoto(String employeeId, String fileId, Integer versionNumber)

Parameters

employeeId
Type: String
ID of the employee.
fileId
Type: String
ID of the uploaded file to use as the employee banner photo. The file must be an image and be smaller than 2 GB.
versionNumber
Type: Integer
Version number of the file. Specify an existing version number or, to get the latest version, specify null.

Return Value

Type: ConnectApi.BannerPhoto

setBannerPhoto(employeeId, fileUpload)

Set a file that hasn’t been uploaded as an employee’s banner photo.

API Version

51.0

Requires Chatter

No

Signature

public static ConnectApi.BannerPhoto setBannerPhoto(String employeeId, ConnectApi.BinaryInput fileUpload)

Parameters

employeeId
Type: String
ID of the employee.
fileUpload
Type: ConnectApi.Binary​​Input
File to use as the photo. The content type must be usable as an image.

Return Value

Type: ConnectApi.BannerPhoto

Usage

Photos are processed asynchronously and might not be visible right away.

setBannerPhotoWithAttributes(employeeId, bannerPhoto)

Set and crop an uploaded file as an employee’s banner photo.

API Version

51.0

Requires Chatter

No

Signature

public static ConnectApi.BannerPhoto setBannerPhotoWithAttributes(String employeeId, ConnectApi.BannerPhotoInput bannerPhoto)

Parameters

employeeId
Type: String
ID of the employee.
bannerPhoto
Type: ConnectApi.BannerPhotoInput
A ConnectApi.BannerPhotoInput object that specifies the ID and version of the file, and how to crop the file.

Return Value

Type: ConnectApi.BannerPhoto

Usage

Photos are processed asynchronously and might not be visible right away.

setBannerPhotoWithAttributes(employeeId, bannerPhoto, fileUpload)

Set and crop a file that hasn’t been uploaded as an employee’s banner photo.

API Version

51.0

Requires Chatter

No

Signature

public static ConnectApi.BannerPhoto setBannerPhotoWithAttributes(String employeeId, ConnectApi.BannerPhotoInput bannerPhoto, ConnectApi.BinaryInput fileUpload)

Parameters

employeeId
Type: String
ID of the employee.
bannerPhoto
Type: ConnectApi.BannerPhotoInput
A ConnectApi.BannerPhotoInput object specifying the cropping parameters.
fileUpload
Type: ConnectApi.Binary​​Input
File to use as the photo. The content type must be usable as an image.

Return Value

Type: ConnectApi.BannerPhoto

Usage

Photos are processed asynchronously and might not be visible right away.

setPhoto(employeeId, fileId, versionNumber)

Set an uploaded file as an employee’s photo.

API Version

51.0

Requires Chatter

No

Signature

public static ConnectApi.Photo setPhoto(String employeeId, String fileId, Integer versionNumber)

Parameters

employeeId
Type: String
ID of the employee.
fileId
Type: String
ID of the uploaded file to use as the employee photo. The file must be an image and be smaller than 2 GB.
versionNumber
Type: Integer
Version number of the file. Specify an existing version number or, to get the latest version, specify null.

Return Value

Type: ConnectApi.Photo

Usage

Photos are processed asynchronously and might not be visible right away.

setPhoto(employeeId, fileUpload)

Set a file that hasn’t been uploaded as an employee’s photo.

API Version

51.0

Requires Chatter

No

Signature

public static ConnectApi.Photo setPhoto(String employeeId, ConnectApi.BinaryInput fileUpload)

Parameters

employeeId
Type: String
ID of the employee.
fileUpload
Type: ConnectApi.Binary​​Input
File to use as the photo. The content type must be usable as an image.

Return Value

Type: ConnectApi.Photo

Usage

Photos are processed asynchronously and might not be visible right away.

setPhotoWithAttributes(employeeId, photo)

Set and crop an uploaded file as an employee’s photo.

API Version

51.0

Requires Chatter

No

Signature

public static ConnectApi.Photo setPhotoWithAttributes(String employeeId, ConnectApi.PhotoInput photo)

Parameters

employeeId
Type: String
ID of the employee.
photo
Type: ConnectApi.PhotoInput
A ConnectApi.PhotoInput object specifying the file ID, version number, and cropping parameters.

Return Value

Type: ConnectApi.Photo

Usage

Photos are processed asynchronously and might not be visible right away.

setPhotoWithAttributes(employeeId, photo, fileUpload)

Set and crop a file that hasn’t been uploaded as an employee’s photo.

API Version

51.0

Requires Chatter

No

Signature

public static ConnectApi.Photo setPhotoWithAttributes(String employeeId, ConnectApi.PhotoInput photo, ConnectApi.BinaryInput fileUpload)

Parameters

employeeId
Type: String
ID of the employee.
photo
Type: ConnectApi.PhotoInput
A ConnectApi.PhotoInput object specifying the cropping parameters.
fileUpload
Type: ConnectApi.Binary​​Input
File to use as the photo. The content type must be usable as an image.

Return Value

Type: ConnectApi.Photo

Usage

Photos are processed asynchronously and might not be visible right away.