ProfileRestClient class
Basklass som ska användas (härledd från) för att göra begäranden till VSS REST API:erna
- Extends
Konstruktorer
Profile |
Egenskaper
RESOURCE_AREA_ID |
Metoder
Konstruktorinformation
ProfileRestClient(IVssRestClientOptions)
Egenskapsinformation
RESOURCE_AREA_ID
static RESOURCE_AREA_ID: string
Egenskapsvärde
string
Metodinformation
createProfile(CreateProfileContext, boolean)
Skapa profil
function createProfile(createProfileContext: CreateProfileContext, autoCreate?: boolean): Promise<Profile>
Parametrar
- createProfileContext
- CreateProfileContext
Kontext för att skapa profil
- autoCreate
-
boolean
Skapa profil automatiskt
Returer
Promise<Profile>
deleteProfileAttribute(string, string)
function deleteProfileAttribute(id: string, descriptor: string): Promise<void>
Parametrar
- id
-
string
- descriptor
-
string
Returer
Promise<void>
getAvatar(string, string, string)
function getAvatar(id: string, size?: string, format?: string): Promise<Avatar>
Parametrar
- id
-
string
- size
-
string
- format
-
string
Returer
Promise<Avatar>
getAvatarPreview(any, string, string, string, string)
function getAvatarPreview(container: any, id: string, size?: string, format?: string, displayName?: string): Promise<Avatar>
Parametrar
- container
-
any
- id
-
string
- size
-
string
- format
-
string
- displayName
-
string
Returer
Promise<Avatar>
getProfile(string, boolean, boolean, string, string, boolean)
Hämtar en användarprofil.
function getProfile(id: string, details?: boolean, withAttributes?: boolean, partition?: string, coreAttributes?: string, forceRefresh?: boolean): Promise<Profile>
Parametrar
- id
-
string
ID:t för målanvändarprofilen i samma organisation eller "jag" för att hämta profilen för den aktuella autentiserade användaren.
- details
-
boolean
Returnera information om offentlig profil, till exempel visningsnamn, e-postadress, land osv. Om det är falskt ignoreras parametern withAttributes.
- withAttributes
-
boolean
Om det är sant hämtar de attribut (namngivna nyckel/värde-par med godtyckliga data) som är associerade med profilen. Partitionsparametern måste också ha ett värde.
- partition
-
string
Partitionen (namngiven grupp) för attribut som ska returneras.
- coreAttributes
-
string
En kommaavgränsad lista över kärnprofilattribut som ska returneras. Giltiga värden är Email, Avatar, DisplayName och ContactWithOffers.
- forceRefresh
-
boolean
Används inte i den här versionen av API:et.
Returer
Promise<Profile>
getProfileAttribute(string, string)
function getProfileAttribute(id: string, descriptor: string): Promise<ProfileAttribute>
Parametrar
- id
-
string
- descriptor
-
string
Returer
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[]>
Parametrar
- id
-
string
- partition
-
string
- modifiedSince
-
string
- modifiedAfterRevision
-
string
- withCoreAttributes
-
boolean
- coreAttributes
-
string
Returer
Promise<ProfileAttribute[]>
resetAvatar(string)
function resetAvatar(id: string): Promise<void>
Parametrar
- id
-
string
Returer
Promise<void>
setAvatar(any, string)
function setAvatar(container: any, id: string): Promise<void>
Parametrar
- container
-
any
- id
-
string
Returer
Promise<void>
setProfileAttribute(any, string, string)
function setProfileAttribute(container: any, id: string, descriptor: string): Promise<void>
Parametrar
- container
-
any
- id
-
string
- descriptor
-
string
Returer
Promise<void>
setProfileAttributes(VssJsonCollectionWrapperV<ProfileAttributeBase<any>[]>, string)
function setProfileAttributes(attributesCollection: VssJsonCollectionWrapperV<ProfileAttributeBase<any>[]>, id: string): Promise<void>
Parametrar
- attributesCollection
- id
-
string
Returer
Promise<void>
updateProfile(Profile, string)
Uppdatera profil
function updateProfile(profile: Profile, id: string): Promise<void>
Parametrar
- profile
- Profile
Uppdatera profil
- id
-
string
Profil-ID
Returer
Promise<void>