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)

Creación de 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)

Actualizar 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)

Creación de perfil

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

Parámetros

createProfileContext
CreateProfileContext

Contexto para la creación de perfiles

autoCreate

boolean

Creación automática de un perfil

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 identificador del perfil de usuario de destino dentro de la misma organización o "me" para obtener el perfil del usuario autenticado actual.

details

boolean

Devuelve información de perfil público, como el nombre para mostrar, la dirección de correo electrónico, el 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 al perfil. El parámetro partition también debe tener un valor.

partition

string

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

coreAttributes

string

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

forceRefresh

boolean

No se usa 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)

Actualizar perfil

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

Parámetros

profile
Profile

Actualizar perfil

id

string

Id. de perfil

Devoluciones

Promise<void>