- Source:
Functions for interacting with student groups within courses
Methods
(async) create(opts, configopt) → {Promise.<CanvasGroup>}
- Source:
- Author:
-
Create a new group in a group set
Parameters:
Name |
Type |
Attributes |
Description |
opts |
object
|
|
object containing all arguments
Properties
Name |
Type |
Attributes |
Default |
Description |
groupSetId |
number
|
|
|
Canvas group set Id to put the group into |
name |
string
|
<optional>
|
Unnamed Group
|
Name of the new group |
description |
string
|
<optional>
|
|
Description of the new group |
isPublic |
boolean
|
<optional>
|
|
If truthy, group is public |
|
config |
APIConfig
|
<optional>
|
custom configuration for this specific endpoint
call (overwrites defaults that were included when api was initialized) |
Returns:
-
Type
-
Promise.<CanvasGroup>
(async) delete(opts, configopt) → {Promise.<CanvasGroup>}
- Source:
- Author:
-
Delete a specific group from a group set
Parameters:
Name |
Type |
Attributes |
Description |
opts |
object
|
|
object containing all arguments
Properties
Name |
Type |
Description |
groupId |
number
|
Canvas group Id to delete |
|
config |
APIConfig
|
<optional>
|
custom configuration for this specific endpoint
call (overwrites defaults that were included when api was initialized) |
Returns:
-
Type
-
Promise.<CanvasGroup>
(async) get(opts, configopt) → {Promise.<CanvasGroup>}
- Source:
- Author:
-
Gets info on a specific group in a course
Parameters:
Name |
Type |
Attributes |
Description |
opts |
object
|
|
object containing all arguments
Properties
Name |
Type |
Attributes |
Description |
groupId |
number
|
|
Canvas group Id |
includeUsers |
boolean
|
<optional>
|
if true, include users as group.users |
|
config |
APIConfig
|
<optional>
|
custom configuration for this specific endpoint
call (overwrites defaults that were included when api was initialized) |
Returns:
-
Type
-
Promise.<CanvasGroup>
(async) listUsers(opts, configopt) → {Promise.<Array.<CanvasUser>>}
- Source:
- Author:
-
Gets the list of users in a group
Parameters:
Name |
Type |
Attributes |
Description |
opts |
object
|
|
object containing all arguments
Properties
Name |
Type |
Description |
groupId |
number
|
Canvas group Id |
|
config |
APIConfig
|
<optional>
|
custom configuration for this specific endpoint
call (overwrites defaults that were included when api was initialized) |
Returns:
-
Type
-
Promise.<Array.<CanvasUser>>
(async) updateMembers(opts, configopt) → {Promise.<CanvasGroup>}
- Source:
- Author:
-
Gets the list of members in a group
Parameters:
Name |
Type |
Attributes |
Description |
opts |
object
|
|
object containing all arguments
Properties
Name |
Type |
Attributes |
Default |
Description |
groupId |
number
|
|
|
Canvas group Id |
members |
Array.<number>
|
<optional>
|
[]
|
The list of user objects/user Ids that
should be in the group |
|
config |
APIConfig
|
<optional>
|
custom configuration for this specific endpoint
call (overwrites defaults that were included when api was initialized) |
Returns:
-
Type
-
Promise.<CanvasGroup>