import ProgressController from 'itslanguage/administrative-sdk/progress/progress-controller.js'
ProgressController
Controller class for the Progress 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 Progress corresponding to a {@Link Category} for the current active {@Link User} 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 getProgress(categoryId: string, groupId: string, roles: Array): Promise<Progress[]> source
Get Progress corresponding to a {@Link Category} for the current active {@Link User} derived from the OAuth2 scope. If a user is allowed to see the progress of multiple users (depending of its {@Link Role} and permissions) then more Progress objects could be returned. This can be controlled with the groupId parameter. This way, only users in a specific group will be returned as a result.
Progress is always being fetched for a single category, identified with a categoryId.
Throw:
Promise.<Error> |
categoryId parameter of type "string" is required. |
Promise.<Error> |
groupId parameter of type "string|null" is required. |
Promise.<Error> |
roles parameter of type "Array|null" is required. |
Promise.<Error> |
If the server returned an error. |