Compartir a través de


ProfileRestClient class

Clase base que se debe usar (derivada de) para realizar solicitudes a las API REST de VSS

Extends

Constructores

ProfileRestClient(IVssRestClientOptions)

Propiedades

RESOURCE_AREA_ID

Métodos

createProfile(CreateProfileContext, boolean)

Crear perfil

deleteProfileAttribute(string, string)
getAvatar(string, string, string)
getAvatarPreview(any, string, string, string, string)
getProfile(string, boolean, boolean, string, string, boolean)

Obtiene un perfil de usuario.

getProfileAttribute(string, string)
getProfileAttributes(string, string, string, string, boolean, string)
resetAvatar(string)
setAvatar(any, string)
setProfileAttribute(any, string, string)
setProfileAttributes(VssJsonCollectionWrapperV<ProfileAttributeBase<any>[]>, string)
updateProfile(Profile, string)

Actualización de perfil

Detalles del constructor

ProfileRestClient(IVssRestClientOptions)

new ProfileRestClient(options: IVssRestClientOptions)

Parámetros

Detalles de las propiedades

RESOURCE_AREA_ID

static RESOURCE_AREA_ID: string

Valor de propiedad

string

Detalles del método

createProfile(CreateProfileContext, boolean)

Crear perfil

function createProfile(createProfileContext: CreateProfileContext, autoCreate?: boolean): Promise<Profile>

Parámetros

createProfileContext
CreateProfileContext

Contexto para la creación de perfiles

autoCreate

boolean

Crear perfil automáticamente

Devoluciones

Promise<Profile>

deleteProfileAttribute(string, string)

function deleteProfileAttribute(id: string, descriptor: string): Promise<void>

Parámetros

id

string

descriptor

string

Devoluciones

Promise<void>

getAvatar(string, string, string)

function getAvatar(id: string, size?: string, format?: string): Promise<Avatar>

Parámetros

id

string

size

string

format

string

Devoluciones

Promise<Avatar>

getAvatarPreview(any, string, string, string, string)

function getAvatarPreview(container: any, id: string, size?: string, format?: string, displayName?: string): Promise<Avatar>

Parámetros

container

any

id

string

size

string

format

string

displayName

string

Devoluciones

Promise<Avatar>

getProfile(string, boolean, boolean, string, string, boolean)

Obtiene un perfil de usuario.

function getProfile(id: string, details?: boolean, withAttributes?: boolean, partition?: string, coreAttributes?: string, forceRefresh?: boolean): Promise<Profile>

Parámetros

id

string

El ID del perfil de usuario de destino dentro de la misma organización, o "yo" para obtener el perfil del usuario autenticado actual.

details

boolean

Devuelve información de perfil público como nombre para mostrar, dirección de correo electrónico, país, etc. Si es false, se omite el parámetro withAttributes.

withAttributes

boolean

Si es true, obtiene los atributos (pares clave-valor con nombre de datos arbitrarios) asociados con el perfil. El parámetro partition también debe tener un valor.

partition

string

La partición (grupo con nombre) de atributos que se van a devolver.

coreAttributes

string

Una lista delimitada por comas de los atributos de perfil principales que se van a devolver. Los valores válidos son Email, Avatar, DisplayName y ContactWithOffers.

forceRefresh

boolean

No se utiliza en esta versión de la API.

Devoluciones

Promise<Profile>

getProfileAttribute(string, string)

function getProfileAttribute(id: string, descriptor: string): Promise<ProfileAttribute>

Parámetros

id

string

descriptor

string

Devoluciones

Promise<ProfileAttribute>

getProfileAttributes(string, string, string, string, boolean, string)

function getProfileAttributes(id: string, partition: string, modifiedSince?: string, modifiedAfterRevision?: string, withCoreAttributes?: boolean, coreAttributes?: string): Promise<ProfileAttribute[]>

Parámetros

id

string

partition

string

modifiedSince

string

modifiedAfterRevision

string

withCoreAttributes

boolean

coreAttributes

string

Devoluciones

Promise<ProfileAttribute[]>

resetAvatar(string)

function resetAvatar(id: string): Promise<void>

Parámetros

id

string

Devoluciones

Promise<void>

setAvatar(any, string)

function setAvatar(container: any, id: string): Promise<void>

Parámetros

container

any

id

string

Devoluciones

Promise<void>

setProfileAttribute(any, string, string)

function setProfileAttribute(container: any, id: string, descriptor: string): Promise<void>

Parámetros

container

any

id

string

descriptor

string

Devoluciones

Promise<void>

setProfileAttributes(VssJsonCollectionWrapperV<ProfileAttributeBase<any>[]>, string)

function setProfileAttributes(attributesCollection: VssJsonCollectionWrapperV<ProfileAttributeBase<any>[]>, id: string): Promise<void>

Parámetros

attributesCollection

VssJsonCollectionWrapperV<ProfileAttributeBase<any>[]>

id

string

Devoluciones

Promise<void>

updateProfile(Profile, string)

Actualización de perfil

function updateProfile(profile: Profile, id: string): Promise<void>

Parámetros

profile
Profile

Actualización de perfil

id

string

ID de perfil

Devoluciones

Promise<void>