Share via


ProfileRestClient class

Basisklasse, die zum Senden von Anforderungen an VSS-REST-APIs verwendet werden soll (abgeleitet von).

Extends

Konstruktoren

ProfileRestClient(IVssRestClientOptions)

Eigenschaften

RESOURCE_AREA_ID

Methoden

createProfile(CreateProfileContext, boolean)

Profil erstellen

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

Ruft ein Benutzerprofil ab.

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)

Update profile (Profil aktualisieren)

Details zum Konstruktor

ProfileRestClient(IVssRestClientOptions)

new ProfileRestClient(options: IVssRestClientOptions)

Parameter

Details zur Eigenschaft

RESOURCE_AREA_ID

static RESOURCE_AREA_ID: string

Eigenschaftswert

string

Details zur Methode

createProfile(CreateProfileContext, boolean)

Profil erstellen

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

Parameter

createProfileContext
CreateProfileContext

Kontext für die Profilerstellung

autoCreate

boolean

Automatisches Erstellen eines Profils

Gibt zurück

Promise<Profile>

deleteProfileAttribute(string, string)

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

Parameter

id

string

descriptor

string

Gibt zurück

Promise<void>

getAvatar(string, string, string)

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

Parameter

id

string

size

string

format

string

Gibt zurück

Promise<Avatar>

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

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

Parameter

container

any

id

string

size

string

format

string

displayName

string

Gibt zurück

Promise<Avatar>

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

Ruft ein Benutzerprofil ab.

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

Parameter

id

string

Die ID des Zielbenutzerprofils innerhalb desselben organization oder "ich", um das Profil des aktuell authentifizierten Benutzers abzurufen.

details

boolean

Geben Sie öffentliche Profilinformationen wie Anzeigename, E-Mail-Adresse, Land usw. zurück. Wenn false, wird der withAttributes-Parameter ignoriert.

withAttributes

boolean

Wenn true, ruft die Attribute (benannte Schlüssel-Wert-Paare beliebiger Daten) ab, die dem Profil zugeordnet sind. Der Partitionsparameter muss auch einen Wert aufweisen.

partition

string

Die Partition (benannte Gruppe) von Attributen, die zurückgegeben werden sollen.

coreAttributes

string

Eine durch Trennzeichen getrennte Liste der zurückzugebenden Hauptprofilattribute. Gültige Werte sind Email, Avatar, DisplayName und ContactWithOffers.

forceRefresh

boolean

Wird in dieser Version der API nicht verwendet.

Gibt zurück

Promise<Profile>

getProfileAttribute(string, string)

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

Parameter

id

string

descriptor

string

Gibt zurück

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[]>

Parameter

id

string

partition

string

modifiedSince

string

modifiedAfterRevision

string

withCoreAttributes

boolean

coreAttributes

string

Gibt zurück

Promise<ProfileAttribute[]>

resetAvatar(string)

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

Parameter

id

string

Gibt zurück

Promise<void>

setAvatar(any, string)

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

Parameter

container

any

id

string

Gibt zurück

Promise<void>

setProfileAttribute(any, string, string)

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

Parameter

container

any

id

string

descriptor

string

Gibt zurück

Promise<void>

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

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

Parameter

attributesCollection

VssJsonCollectionWrapperV<ProfileAttributeBase<any>[]>

id

string

Gibt zurück

Promise<void>

updateProfile(Profile, string)

Update profile (Profil aktualisieren)

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

Parameter

profile
Profile

Update profile (Profil aktualisieren)

id

string

Profil-ID

Gibt zurück

Promise<void>