import GroupController from 'itslanguage/administrative-sdk/group/group-controller.js'
GroupController
Controller class for the Group 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 |
createGroup(group: Organisation): Promise<Group> Create a group. |
|
public |
Get a group which is part of the current active Organisation derived from the OAuth2 scope. |
|
public |
Get and return all groups 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 createGroup(group: Organisation): Promise<Group> source
Create a group. The group will be part of the current active Organisation derived from the OAuth2 scope.
Params:
Name | Type | Attribute | Description |
group | Organisation | Object to create. |
Throw:
Promise.<Error> |
organisation parameter of type "Group" is required. |
Promise.<Error> |
If the server returned an error. |
public getGroup(groupId: string): Promise<Group> source
Get a group which is part of the current active Organisation derived from the OAuth2 scope.
Params:
Name | Type | Attribute | Description |
groupId | string | Specify a group identifier. |
Throw:
Promise.<Error> |
groupId parameter of type "string" is required. |
Promise.<Error> |
If no result could not be found. |