Megosztás:


ProfileRestClient class

Alaposztály, amelyet a VSS REST API-k kéréseinek igényléséhez (származtatásából) kell használni

Extends

Konstruktorok

ProfileRestClient(IVssRestClientOptions)

Tulajdonságok

RESOURCE_AREA_ID

Metódusok

createProfile(CreateProfileContext, boolean)

Profil létrehozása

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

Felhasználói profilt kap.

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)

Profil frissítése

Konstruktor adatai

ProfileRestClient(IVssRestClientOptions)

new ProfileRestClient(options: IVssRestClientOptions)

Paraméterek

Tulajdonság adatai

RESOURCE_AREA_ID

static RESOURCE_AREA_ID: string

Tulajdonság értéke

string

Metódus adatai

createProfile(CreateProfileContext, boolean)

Profil létrehozása

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

Paraméterek

createProfileContext
CreateProfileContext

A profil létrehozásának környezete

autoCreate

boolean

Profil automatikus létrehozása

Válaszok

Promise<Profile>

deleteProfileAttribute(string, string)

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

Paraméterek

id

string

descriptor

string

Válaszok

Promise<void>

getAvatar(string, string, string)

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

Paraméterek

id

string

size

string

format

string

Válaszok

Promise<Avatar>

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

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

Paraméterek

container

any

id

string

size

string

format

string

displayName

string

Válaszok

Promise<Avatar>

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

Felhasználói profilt kap.

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

Paraméterek

id

string

A cél felhasználói profil azonosítója ugyanazon a szervezeten belül, vagy "én" az aktuálisan hitelesített felhasználó profiljának lekéréséhez.

details

boolean

Adja vissza a nyilvános profiladatokat, például megjelenített nevet, e-mail címet, országot stb. Ha hamis, a rendszer figyelmen kívül hagyja a withAttributes paramétert.

withAttributes

boolean

Ha igaz, lekéri a profilhoz társított attribútumokat (tetszőleges adatok elnevezett kulcs-érték párjait). A partíciós paraméternek is rendelkeznie kell értékkel.

partition

string

A visszaadni kívánt attribútumok partíciója (elnevezett csoportja).

coreAttributes

string

A visszaadandó alapvető profilattribútumok vesszővel tagolt listája. Érvényes értékek: Email, Avatar, DisplayName és ContactWithOffers.

forceRefresh

boolean

Az API ezen verziójában nem használatos.

Válaszok

Promise<Profile>

getProfileAttribute(string, string)

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

Paraméterek

id

string

descriptor

string

Válaszok

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

Paraméterek

id

string

partition

string

modifiedSince

string

modifiedAfterRevision

string

withCoreAttributes

boolean

coreAttributes

string

Válaszok

Promise<ProfileAttribute[]>

resetAvatar(string)

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

Paraméterek

id

string

Válaszok

Promise<void>

setAvatar(any, string)

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

Paraméterek

container

any

id

string

Válaszok

Promise<void>

setProfileAttribute(any, string, string)

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

Paraméterek

container

any

id

string

descriptor

string

Válaszok

Promise<void>

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

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

Paraméterek

attributesCollection

VssJsonCollectionWrapperV<ProfileAttributeBase<any>[]>

id

string

Válaszok

Promise<void>

updateProfile(Profile, string)

Profil frissítése

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

Paraméterek

profile
Profile

Profil frissítése

id

string

Profil azonosítója

Válaszok

Promise<void>