SectionService#
- class SectionService[source]#
Methods
Add users to a course section.
Connect users to a course section.
Get a course section.
Delete a course section.
Update a course section.
Remove a user from a course section.
- add_users(json_body, *, section_id, extra_parameters=None)[source]#
Add users to a course section.
- Parameters:
json_body (
Union
[dict
,list
,AddUsersSectionData
]) – The body of the request. SeeAddUsersSectionData
for information about the possible fields. You can provide this data as aAddUsersSectionData
or as a dictionary.section_id (
str
) – The id of the course section to add a user to.extra_parameters (
Optional
[Mapping
[str
,Union
[str
,bool
,int
,float
]]]) – The extra query parameters you might want to add. By default no extra query parameters are added.self (SectionService[AuthenticatedClient]) –
- Returns:
The updated course section.
- Return type:
- create_division(json_body, *, section_id, extra_parameters=None)[source]#
Connect users to a course section.
Users that are already enrolled in the course connected to this section are immediately added to the course section. Other users will be added to the section as soon as they enroll in the course.
- Parameters:
json_body (
Union
[dict
,list
,CreateDivisionSectionData
]) – The body of the request. SeeCreateDivisionSectionData
for information about the possible fields. You can provide this data as aCreateDivisionSectionData
or as a dictionary.section_id (
str
) – The id of the course section to connect users to.extra_parameters (
Optional
[Mapping
[str
,Union
[str
,bool
,int
,float
]]]) – The extra query parameters you might want to add. By default no extra query parameters are added.self (SectionService[AuthenticatedClient]) –
- Returns:
The new division containing the users that were not immediately added to the course section.
- Return type:
- get(*, section_id, extra_parameters=None)[source]#
Get a course section.
- Parameters:
- Returns:
The requested course section.
- Return type:
- delete(*, section_id, extra_parameters=None)[source]#
Delete a course section.
- Parameters:
- Returns:
Nothing.
- Return type:
None
- patch(json_body, *, section_id, extra_parameters=None)[source]#
Update a course section.
- Parameters:
json_body (
Union
[dict
,list
,PatchSectionData
]) – The body of the request. SeePatchSectionData
for information about the possible fields. You can provide this data as aPatchSectionData
or as a dictionary.section_id (
str
) – The id of the course section to update.extra_parameters (
Optional
[Mapping
[str
,Union
[str
,bool
,int
,float
]]]) – The extra query parameters you might want to add. By default no extra query parameters are added.self (SectionService[AuthenticatedClient]) –
- Returns:
The updated course section.
- Return type:
- delete_user(*, section_id, user_id, extra_parameters=None)[source]#
Remove a user from a course section.
- Parameters:
section_id (
str
) – The id of the course section to remove the user from.user_id (
int
) – The id of the user to remove from the course section.extra_parameters (
Optional
[Mapping
[str
,Union
[str
,bool
,int
,float
]]]) – The extra query parameters you might want to add. By default no extra query parameters are added.self (SectionService[AuthenticatedClient]) –
- Returns:
The updated course section.
- Return type: