Home Manual Reference Source
private class | source

ChoiceChallengeController

Controller class for the ChoiceChallenge 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

Create a choice challenge.

public

Get a choice challenge.

public

Get and return all choice challenges 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 createChoiceChallenge(choiceChallenge: ChoiceChallenge): Promise<ChoiceChallenge> source

Create a choice challenge. The choice challenge will be created in the current active Organisation derived from the OAuth2 scope. It is necessary for a choice challenge to exist for a recording to be valid.

Params:

NameTypeAttributeDescription
choiceChallenge ChoiceChallenge

Object to create.

Return:

Promise<ChoiceChallenge>

Containing the newly created ChoiceChallenge.

Throw:

Promise.<Error>

choiceChallenge parameter of type "ChoiceChallenge" is required.

Promise.<Error>

If the server returned an error.

public getChoiceChallenge(challengeId: string): Promise<ChoiceChallenge> source

Get a choice challenge. A choice challenge is identified by its identifier and the current active Organisation derived from the OAuth2 scope.

Params:

NameTypeAttributeDescription
challengeId string

Specify a choice challenge identifier.

Return:

Promise<ChoiceChallenge>

Containing a ChoiceChallenge.

Throw:

Promise.<Error>

challengeId parameter of type "string" is required.

Promise.<Error>

If no result could not be found.

public getChoiceChallenges(): Promise<ChoiceChallenge[]> source

Get and return all choice challenges in the current active Organisation derived from the OAuth2 scope.

Return:

Promise<ChoiceChallenge[]>

Containing an array of ChoiceChallenges.

Throw:

Promise.<Error>

If no result could not be found.