Home Manual Reference Source
private class | source

ProfileController

Controller class for the Profile model.

Constructor Summary

Public Constructor
public

constructor(connection: Connection)

Member Summary

Private Members
private

Object to use for making a connection to the REST API and Websocket server.

Method Summary

Public Methods
public

Get the profile of the given user active in the current active Organisation derived from the OAuth2 scope.

public

Get and return all profiles of all users in the current active Organisation derived from the OAuth2 scope.

Public Constructors

public constructor(connection: Connection) source

Params:

NameTypeAttributeDescription
connection Connection

Object to use for making a connection to the REST API and Websocket server.

Private Members

private _connection: Connection source

Object to use for making a connection to the REST API and Websocket server.

Public Methods

public getProfile(userId: string): Promise<Profile> source

Get the profile of the given user active in the current active Organisation derived from the OAuth2 scope.

Params:

NameTypeAttributeDescription
userId string

Specify a User identifier.

Return:

Promise<Profile>

Promise containing a Profile.

Throw:

Promise.<Error>

userId parameter of type "string" is required.

Promise.<Error>

If no result could not be found.

public getProfiles(): Promise<Profile[]> source

Get and return all profiles of all users in the current active Organisation derived from the OAuth2 scope.

Return:

Promise<Profile[]>

Array of Profiles.

Throw:

Promise.<Error>

If the server returned an error.