IPersonaService

Service for interacting with the persona API.

Properties

string CurrentAccessToken

Gets or sets the current access token.

bool HasAccessToken

Gets a value indicating whether an access token is available.

event PersonaUpdated OnCurrentPersonaUpdated

Event fired when the current persona is updated.

Methods

UniTask GetAccessToken(AccessTokenSuccess success, ErrorCallback errorCallback)

Attempts to get an access token. The success callback will fire with the token if successful.

UniTask CreatePersona(Persona persona, SuccessCreatePersona success, ErrorCallback errorCallback)

Attempts to create a new persona and confirms it was successful if the SuccessCreatePersona delegate is called.

bool GetCurrentPersona(out Persona currentPersona)

Attempts to get the current persona from the cache. Returns true if it was found, false otherwise.

UniTask GetCurrentPersona(SuccessGetCurrentPersona success, ErrorCallback errorCallback)

Attempts to get the current persona from the web service and returns it in the SuccessGetCurrentPersona delegate.

UniTask GetPersonas(SuccessPersonas success, ErrorCallback errorCallback)

Attempts to returns a list of personas and the current persona (if any) in the SuccessPersonas delegate.

UniTask EditPersona(Persona persona, SuccessEditPersona success, ErrorCallback errorCallback)

Attempts to edit a persona and confirms it was successful if the SuccessEditPersona delegate is called.

UniTask DeletePersona(Persona persona, SuccessDeletePersona success, ErrorCallback errorCallback)

Attempts to delete a persona and confirms it was successful if the SuccessDeletePersona delegate is called.

UniTask SetCurrentPersona(Persona persona, SuccessSetCurrentPersona success, ErrorCallback errorCallback)

Attempts to set the current persona and confirms it was successful if the SuccessSetCurrentPersona delegate is called.

Last updated