Skip to main content

Function: getAvatar()

getAvatar<T>(client, props, binaryResponse?): Promise<BinaryResponseType<T>>

Gets avatar binary data.

Type Parameters​

T​

T extends BinaryResponse

Parameters​

client​

ApiClient

The API client instance

props​

The request properties

query​

{ width?: number; height?: number; quality?: number; format?: "webp" | "avif" | "jpg" | "png"; redirectOnNotFound?: string; cacheKey?: string; orgName: string; projectName: string; } | { width?: number; height?: number; quality?: number; format?: "webp" | "avif" | "jpg" | "png"; redirectOnNotFound?: string; cacheKey?: string; orgName: string; } = getAvatarQuerySchema

Query parameters (orgName, optional projectName, image transform options)

binaryResponse?​

T = ...

Optional binary response type configuration

Returns​

Promise<BinaryResponseType<T>>

Promise resolving to the avatar binary data

Operation Id​

get-avatar

Example​

const avatarData = await getAvatar(client, {
query: { orgName: 'my-org', width: 200, height: 200 }
});