import ChoiceChallengeController from 'itslanguage/administrative-sdk/choice-challenge/choice-challenge-controller.js'
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 |
createChoiceChallenge(choiceChallenge: ChoiceChallenge): Promise<ChoiceChallenge> Create a choice challenge. |
|
public |
getChoiceChallenge(challengeId: string): Promise<ChoiceChallenge> 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:
Name | Type | Attribute | Description |
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:
Name | Type | Attribute | Description |
choiceChallenge | ChoiceChallenge | Object to create. |
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:
Name | Type | Attribute | Description |
challengeId | string | Specify a choice challenge identifier. |
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.
Throw:
Promise.<Error> |
If no result could not be found. |