ProfileRestClient class
Basisklasse, die verwendet werden soll (abgeleitet von), um Anforderungen an VSS-REST-APIs zu stellen
- Extends
Konstruktoren
| Profile |
Eigenschaften
| RESOURCE_AREA_ID |
Methoden
Details zum Konstruktor
ProfileRestClient(IVssRestClientOptions)
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
Profil automatisch erstellen
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 derselben Organisation oder "me", um das Profil des aktuellen authentifizierten Benutzers abzurufen.
- details
-
boolean
Geben Sie öffentliche Profilinformationen wie Anzeigename, E-Mail-Adresse, Land usw. zurück. Bei false wird der withAttributes-Parameter ignoriert.
- withAttributes
-
boolean
Bei true werden die Attribute (benannte Schlüssel-Wert-Paare beliebiger Daten) abgerufen, die dem Profil zugeordnet sind. Der Partitionsparameter muss ebenfalls einen Wert aufweisen.
- partition
-
string
Die Partition (benannte Gruppe) der zurückzugebenden Attribute.
- coreAttributes
-
string
Eine durch Kommas getrennte Liste von Kernprofilattributen, die zurückgegeben werden sollen. 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
- id
-
string
Gibt zurück
Promise<void>
updateProfile(Profile, string)
Profil aktualisieren
function updateProfile(profile: Profile, id: string): Promise<void>
Parameter
- profile
- Profile
Profil aktualisieren
- id
-
string
Profil-ID
Gibt zurück
Promise<void>