Struct google_classroom1::api::CourseMethods
source · pub struct CourseMethods<'a, S>where
S: 'a,{ /* private fields */ }
Expand description
A builder providing access to all methods supported on course resources.
It is not used directly, but through the Classroom
hub.
§Example
Instantiate a resource builder
extern crate hyper;
extern crate hyper_rustls;
extern crate google_classroom1 as classroom1;
use std::default::Default;
use classroom1::{Classroom, oauth2, hyper, hyper_rustls, chrono, FieldMask};
let secret: oauth2::ApplicationSecret = Default::default();
let auth = oauth2::InstalledFlowAuthenticator::builder(
secret,
oauth2::InstalledFlowReturnMethod::HTTPRedirect,
).build().await.unwrap();
let mut hub = Classroom::new(hyper::Client::builder().build(hyper_rustls::HttpsConnectorBuilder::new().with_native_roots().https_or_http().enable_http1().build()), auth);
// Usually you wouldn't bind this to a variable, but keep calling *CallBuilders*
// like `aliases_create(...)`, `aliases_delete(...)`, `aliases_list(...)`, `announcements_create(...)`, `announcements_delete(...)`, `announcements_get(...)`, `announcements_list(...)`, `announcements_modify_assignees(...)`, `announcements_patch(...)`, `course_work_create(...)`, `course_work_delete(...)`, `course_work_get(...)`, `course_work_list(...)`, `course_work_materials_create(...)`, `course_work_materials_delete(...)`, `course_work_materials_get(...)`, `course_work_materials_list(...)`, `course_work_materials_patch(...)`, `course_work_modify_assignees(...)`, `course_work_patch(...)`, `course_work_student_submissions_get(...)`, `course_work_student_submissions_list(...)`, `course_work_student_submissions_modify_attachments(...)`, `course_work_student_submissions_patch(...)`, `course_work_student_submissions_reclaim(...)`, `course_work_student_submissions_return(...)`, `course_work_student_submissions_turn_in(...)`, `create(...)`, `delete(...)`, `get(...)`, `list(...)`, `patch(...)`, `students_create(...)`, `students_delete(...)`, `students_get(...)`, `students_list(...)`, `teachers_create(...)`, `teachers_delete(...)`, `teachers_get(...)`, `teachers_list(...)`, `topics_create(...)`, `topics_delete(...)`, `topics_get(...)`, `topics_list(...)`, `topics_patch(...)` and `update(...)`
// to build up your call.
let rb = hub.courses();
Implementations§
source§impl<'a, S> CourseMethods<'a, S>
impl<'a, S> CourseMethods<'a, S>
sourcepub fn aliases_create(
&self,
request: CourseAlias,
course_id: &str
) -> CourseAliasCreateCall<'a, S>
pub fn aliases_create( &self, request: CourseAlias, course_id: &str ) -> CourseAliasCreateCall<'a, S>
Create a builder to help you perform the following task:
Creates an alias for a course. This method returns the following error codes: * PERMISSION_DENIED
if the requesting user is not permitted to create the alias or for access errors. * NOT_FOUND
if the course does not exist. * ALREADY_EXISTS
if the alias already exists. * FAILED_PRECONDITION
if the alias requested does not make sense for the requesting user or course (for example, if a user not in a domain attempts to access a domain-scoped alias).
§Arguments
request
- No description provided.courseId
- Identifier of the course to alias. This identifier can be either the Classroom-assigned identifier or an alias.
sourcepub fn aliases_delete(
&self,
course_id: &str,
alias: &str
) -> CourseAliasDeleteCall<'a, S>
pub fn aliases_delete( &self, course_id: &str, alias: &str ) -> CourseAliasDeleteCall<'a, S>
Create a builder to help you perform the following task:
Deletes an alias of a course. This method returns the following error codes: * PERMISSION_DENIED
if the requesting user is not permitted to remove the alias or for access errors. * NOT_FOUND
if the alias does not exist. * FAILED_PRECONDITION
if the alias requested does not make sense for the requesting user or course (for example, if a user not in a domain attempts to delete a domain-scoped alias).
§Arguments
courseId
- Identifier of the course whose alias should be deleted. This identifier can be either the Classroom-assigned identifier or an alias.alias
- Alias to delete. This may not be the Classroom-assigned identifier.
sourcepub fn aliases_list(&self, course_id: &str) -> CourseAliasListCall<'a, S>
pub fn aliases_list(&self, course_id: &str) -> CourseAliasListCall<'a, S>
Create a builder to help you perform the following task:
Returns a list of aliases for a course. This method returns the following error codes: * PERMISSION_DENIED
if the requesting user is not permitted to access the course or for access errors. * NOT_FOUND
if the course does not exist.
§Arguments
courseId
- The identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias.
sourcepub fn announcements_create(
&self,
request: Announcement,
course_id: &str
) -> CourseAnnouncementCreateCall<'a, S>
pub fn announcements_create( &self, request: Announcement, course_id: &str ) -> CourseAnnouncementCreateCall<'a, S>
Create a builder to help you perform the following task:
Creates an announcement. This method returns the following error codes: * PERMISSION_DENIED
if the requesting user is not permitted to access the requested course, create announcements in the requested course, share a Drive attachment, or for access errors. * INVALID_ARGUMENT
if the request is malformed. * NOT_FOUND
if the requested course does not exist. * FAILED_PRECONDITION
for the following request error: * AttachmentNotVisible
§Arguments
request
- No description provided.courseId
- Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias.
sourcepub fn announcements_delete(
&self,
course_id: &str,
id: &str
) -> CourseAnnouncementDeleteCall<'a, S>
pub fn announcements_delete( &self, course_id: &str, id: &str ) -> CourseAnnouncementDeleteCall<'a, S>
Create a builder to help you perform the following task:
Deletes an announcement. This request must be made by the Developer Console project of the OAuth client ID used to create the corresponding announcement item. This method returns the following error codes: * PERMISSION_DENIED
if the requesting developer project did not create the corresponding announcement, if the requesting user is not permitted to delete the requested course or for access errors. * FAILED_PRECONDITION
if the requested announcement has already been deleted. * NOT_FOUND
if no course exists with the requested ID.
§Arguments
courseId
- Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias.id
- Identifier of the announcement to delete. This identifier is a Classroom-assigned identifier.
sourcepub fn announcements_get(
&self,
course_id: &str,
id: &str
) -> CourseAnnouncementGetCall<'a, S>
pub fn announcements_get( &self, course_id: &str, id: &str ) -> CourseAnnouncementGetCall<'a, S>
Create a builder to help you perform the following task:
Returns an announcement. This method returns the following error codes: * PERMISSION_DENIED
if the requesting user is not permitted to access the requested course or announcement, or for access errors. * INVALID_ARGUMENT
if the request is malformed. * NOT_FOUND
if the requested course or announcement does not exist.
§Arguments
courseId
- Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias.id
- Identifier of the announcement.
sourcepub fn announcements_list(
&self,
course_id: &str
) -> CourseAnnouncementListCall<'a, S>
pub fn announcements_list( &self, course_id: &str ) -> CourseAnnouncementListCall<'a, S>
Create a builder to help you perform the following task:
Returns a list of announcements that the requester is permitted to view. Course students may only view PUBLISHED
announcements. Course teachers and domain administrators may view all announcements. This method returns the following error codes: * PERMISSION_DENIED
if the requesting user is not permitted to access the requested course or for access errors. * INVALID_ARGUMENT
if the request is malformed. * NOT_FOUND
if the requested course does not exist.
§Arguments
courseId
- Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias.
sourcepub fn announcements_modify_assignees(
&self,
request: ModifyAnnouncementAssigneesRequest,
course_id: &str,
id: &str
) -> CourseAnnouncementModifyAssigneeCall<'a, S>
pub fn announcements_modify_assignees( &self, request: ModifyAnnouncementAssigneesRequest, course_id: &str, id: &str ) -> CourseAnnouncementModifyAssigneeCall<'a, S>
Create a builder to help you perform the following task:
Modifies assignee mode and options of an announcement. Only a teacher of the course that contains the announcement may call this method. This method returns the following error codes: * PERMISSION_DENIED
if the requesting user is not permitted to access the requested course or course work or for access errors. * INVALID_ARGUMENT
if the request is malformed. * NOT_FOUND
if the requested course or course work does not exist.
§Arguments
request
- No description provided.courseId
- Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias.id
- Identifier of the announcement.
sourcepub fn announcements_patch(
&self,
request: Announcement,
course_id: &str,
id: &str
) -> CourseAnnouncementPatchCall<'a, S>
pub fn announcements_patch( &self, request: Announcement, course_id: &str, id: &str ) -> CourseAnnouncementPatchCall<'a, S>
Create a builder to help you perform the following task:
Updates one or more fields of an announcement. This method returns the following error codes: * PERMISSION_DENIED
if the requesting developer project did not create the corresponding announcement or for access errors. * INVALID_ARGUMENT
if the request is malformed. * FAILED_PRECONDITION
if the requested announcement has already been deleted. * NOT_FOUND
if the requested course or announcement does not exist
§Arguments
request
- No description provided.courseId
- Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias.id
- Identifier of the announcement.
sourcepub fn course_work_student_submissions_get(
&self,
course_id: &str,
course_work_id: &str,
id: &str
) -> CourseCourseWorkStudentSubmissionGetCall<'a, S>
pub fn course_work_student_submissions_get( &self, course_id: &str, course_work_id: &str, id: &str ) -> CourseCourseWorkStudentSubmissionGetCall<'a, S>
Create a builder to help you perform the following task:
Returns a student submission. * PERMISSION_DENIED
if the requesting user is not permitted to access the requested course, course work, or student submission or for access errors. * INVALID_ARGUMENT
if the request is malformed. * NOT_FOUND
if the requested course, course work, or student submission does not exist.
§Arguments
courseId
- Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias.courseWorkId
- Identifier of the course work.id
- Identifier of the student submission.
sourcepub fn course_work_student_submissions_list(
&self,
course_id: &str,
course_work_id: &str
) -> CourseCourseWorkStudentSubmissionListCall<'a, S>
pub fn course_work_student_submissions_list( &self, course_id: &str, course_work_id: &str ) -> CourseCourseWorkStudentSubmissionListCall<'a, S>
Create a builder to help you perform the following task:
Returns a list of student submissions that the requester is permitted to view, factoring in the OAuth scopes of the request. -
may be specified as the course_work_id
to include student submissions for multiple course work items. Course students may only view their own work. Course teachers and domain administrators may view all student submissions. This method returns the following error codes: * PERMISSION_DENIED
if the requesting user is not permitted to access the requested course or course work, or for access errors. * INVALID_ARGUMENT
if the request is malformed. * NOT_FOUND
if the requested course does not exist.
§Arguments
courseId
- Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias.courseWorkId
- Identifier of the student work to request. This may be set to the string literal"-"
to request student work for all course work in the specified course.
sourcepub fn course_work_student_submissions_modify_attachments(
&self,
request: ModifyAttachmentsRequest,
course_id: &str,
course_work_id: &str,
id: &str
) -> CourseCourseWorkStudentSubmissionModifyAttachmentCall<'a, S>
pub fn course_work_student_submissions_modify_attachments( &self, request: ModifyAttachmentsRequest, course_id: &str, course_work_id: &str, id: &str ) -> CourseCourseWorkStudentSubmissionModifyAttachmentCall<'a, S>
Create a builder to help you perform the following task:
Modifies attachments of student submission. Attachments may only be added to student submissions belonging to course work objects with a workType
of ASSIGNMENT
. This request must be made by the Developer Console project of the OAuth client ID used to create the corresponding course work item. This method returns the following error codes: * PERMISSION_DENIED
if the requesting user is not permitted to access the requested course or course work, if the user is not permitted to modify attachments on the requested student submission, or for access errors. * INVALID_ARGUMENT
if the request is malformed. * NOT_FOUND
if the requested course, course work, or student submission does not exist.
§Arguments
request
- No description provided.courseId
- Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias.courseWorkId
- Identifier of the course work.id
- Identifier of the student submission.
sourcepub fn course_work_student_submissions_patch(
&self,
request: StudentSubmission,
course_id: &str,
course_work_id: &str,
id: &str
) -> CourseCourseWorkStudentSubmissionPatchCall<'a, S>
pub fn course_work_student_submissions_patch( &self, request: StudentSubmission, course_id: &str, course_work_id: &str, id: &str ) -> CourseCourseWorkStudentSubmissionPatchCall<'a, S>
Create a builder to help you perform the following task:
Updates one or more fields of a student submission. See google.classroom.v1.StudentSubmission for details of which fields may be updated and who may change them. This request must be made by the Developer Console project of the OAuth client ID used to create the corresponding course work item. This method returns the following error codes: * PERMISSION_DENIED
if the requesting developer project did not create the corresponding course work, if the user is not permitted to make the requested modification to the student submission, or for access errors. * INVALID_ARGUMENT
if the request is malformed. * NOT_FOUND
if the requested course, course work, or student submission does not exist.
§Arguments
request
- No description provided.courseId
- Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias.courseWorkId
- Identifier of the course work.id
- Identifier of the student submission.
sourcepub fn course_work_student_submissions_reclaim(
&self,
request: ReclaimStudentSubmissionRequest,
course_id: &str,
course_work_id: &str,
id: &str
) -> CourseCourseWorkStudentSubmissionReclaimCall<'a, S>
pub fn course_work_student_submissions_reclaim( &self, request: ReclaimStudentSubmissionRequest, course_id: &str, course_work_id: &str, id: &str ) -> CourseCourseWorkStudentSubmissionReclaimCall<'a, S>
Create a builder to help you perform the following task:
Reclaims a student submission on behalf of the student that owns it. Reclaiming a student submission transfers ownership of attached Drive files to the student and updates the submission state. Only the student that owns the requested student submission may call this method, and only for a student submission that has been turned in. This request must be made by the Developer Console project of the OAuth client ID used to create the corresponding course work item. This method returns the following error codes: * PERMISSION_DENIED
if the requesting user is not permitted to access the requested course or course work, unsubmit the requested student submission, or for access errors. * FAILED_PRECONDITION
if the student submission has not been turned in. * INVALID_ARGUMENT
if the request is malformed. * NOT_FOUND
if the requested course, course work, or student submission does not exist.
§Arguments
request
- No description provided.courseId
- Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias.courseWorkId
- Identifier of the course work.id
- Identifier of the student submission.
sourcepub fn course_work_student_submissions_return(
&self,
request: ReturnStudentSubmissionRequest,
course_id: &str,
course_work_id: &str,
id: &str
) -> CourseCourseWorkStudentSubmissionReturnCall<'a, S>
pub fn course_work_student_submissions_return( &self, request: ReturnStudentSubmissionRequest, course_id: &str, course_work_id: &str, id: &str ) -> CourseCourseWorkStudentSubmissionReturnCall<'a, S>
Create a builder to help you perform the following task:
Returns a student submission. Returning a student submission transfers ownership of attached Drive files to the student and may also update the submission state. Unlike the Classroom application, returning a student submission does not set assignedGrade to the draftGrade value. Only a teacher of the course that contains the requested student submission may call this method. This request must be made by the Developer Console project of the OAuth client ID used to create the corresponding course work item. This method returns the following error codes: * PERMISSION_DENIED
if the requesting user is not permitted to access the requested course or course work, return the requested student submission, or for access errors. * INVALID_ARGUMENT
if the request is malformed. * NOT_FOUND
if the requested course, course work, or student submission does not exist.
§Arguments
request
- No description provided.courseId
- Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias.courseWorkId
- Identifier of the course work.id
- Identifier of the student submission.
sourcepub fn course_work_student_submissions_turn_in(
&self,
request: TurnInStudentSubmissionRequest,
course_id: &str,
course_work_id: &str,
id: &str
) -> CourseCourseWorkStudentSubmissionTurnInCall<'a, S>
pub fn course_work_student_submissions_turn_in( &self, request: TurnInStudentSubmissionRequest, course_id: &str, course_work_id: &str, id: &str ) -> CourseCourseWorkStudentSubmissionTurnInCall<'a, S>
Create a builder to help you perform the following task:
Turns in a student submission. Turning in a student submission transfers ownership of attached Drive files to the teacher and may also update the submission state. This may only be called by the student that owns the specified student submission. This request must be made by the Developer Console project of the OAuth client ID used to create the corresponding course work item. This method returns the following error codes: * PERMISSION_DENIED
if the requesting user is not permitted to access the requested course or course work, turn in the requested student submission, or for access errors. * INVALID_ARGUMENT
if the request is malformed. * NOT_FOUND
if the requested course, course work, or student submission does not exist.
§Arguments
request
- No description provided.courseId
- Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias.courseWorkId
- Identifier of the course work.id
- Identifier of the student submission.
sourcepub fn course_work_create(
&self,
request: CourseWork,
course_id: &str
) -> CourseCourseWorkCreateCall<'a, S>
pub fn course_work_create( &self, request: CourseWork, course_id: &str ) -> CourseCourseWorkCreateCall<'a, S>
Create a builder to help you perform the following task:
Creates course work. The resulting course work (and corresponding student submissions) are associated with the Developer Console project of the OAuth client ID used to make the request. Classroom API requests to modify course work and student submissions must be made with an OAuth client ID from the associated Developer Console project. This method returns the following error codes: * PERMISSION_DENIED
if the requesting user is not permitted to access the requested course, create course work in the requested course, share a Drive attachment, or for access errors. * INVALID_ARGUMENT
if the request is malformed. * NOT_FOUND
if the requested course does not exist. * FAILED_PRECONDITION
for the following request error: * AttachmentNotVisible
§Arguments
request
- No description provided.courseId
- Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias.
sourcepub fn course_work_delete(
&self,
course_id: &str,
id: &str
) -> CourseCourseWorkDeleteCall<'a, S>
pub fn course_work_delete( &self, course_id: &str, id: &str ) -> CourseCourseWorkDeleteCall<'a, S>
Create a builder to help you perform the following task:
Deletes a course work. This request must be made by the Developer Console project of the OAuth client ID used to create the corresponding course work item. This method returns the following error codes: * PERMISSION_DENIED
if the requesting developer project did not create the corresponding course work, if the requesting user is not permitted to delete the requested course or for access errors. * FAILED_PRECONDITION
if the requested course work has already been deleted. * NOT_FOUND
if no course exists with the requested ID.
§Arguments
courseId
- Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias.id
- Identifier of the course work to delete. This identifier is a Classroom-assigned identifier.
sourcepub fn course_work_get(
&self,
course_id: &str,
id: &str
) -> CourseCourseWorkGetCall<'a, S>
pub fn course_work_get( &self, course_id: &str, id: &str ) -> CourseCourseWorkGetCall<'a, S>
Create a builder to help you perform the following task:
Returns course work. This method returns the following error codes: * PERMISSION_DENIED
if the requesting user is not permitted to access the requested course or course work, or for access errors. * INVALID_ARGUMENT
if the request is malformed. * NOT_FOUND
if the requested course or course work does not exist.
§Arguments
courseId
- Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias.id
- Identifier of the course work.
sourcepub fn course_work_list(
&self,
course_id: &str
) -> CourseCourseWorkListCall<'a, S>
pub fn course_work_list( &self, course_id: &str ) -> CourseCourseWorkListCall<'a, S>
Create a builder to help you perform the following task:
Returns a list of course work that the requester is permitted to view. Course students may only view PUBLISHED
course work. Course teachers and domain administrators may view all course work. This method returns the following error codes: * PERMISSION_DENIED
if the requesting user is not permitted to access the requested course or for access errors. * INVALID_ARGUMENT
if the request is malformed. * NOT_FOUND
if the requested course does not exist.
§Arguments
courseId
- Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias.
sourcepub fn course_work_modify_assignees(
&self,
request: ModifyCourseWorkAssigneesRequest,
course_id: &str,
id: &str
) -> CourseCourseWorkModifyAssigneeCall<'a, S>
pub fn course_work_modify_assignees( &self, request: ModifyCourseWorkAssigneesRequest, course_id: &str, id: &str ) -> CourseCourseWorkModifyAssigneeCall<'a, S>
Create a builder to help you perform the following task:
Modifies assignee mode and options of a coursework. Only a teacher of the course that contains the coursework may call this method. This method returns the following error codes: * PERMISSION_DENIED
if the requesting user is not permitted to access the requested course or course work or for access errors. * INVALID_ARGUMENT
if the request is malformed. * NOT_FOUND
if the requested course or course work does not exist.
§Arguments
request
- No description provided.courseId
- Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias.id
- Identifier of the coursework.
sourcepub fn course_work_patch(
&self,
request: CourseWork,
course_id: &str,
id: &str
) -> CourseCourseWorkPatchCall<'a, S>
pub fn course_work_patch( &self, request: CourseWork, course_id: &str, id: &str ) -> CourseCourseWorkPatchCall<'a, S>
Create a builder to help you perform the following task:
Updates one or more fields of a course work. See google.classroom.v1.CourseWork for details of which fields may be updated and who may change them. This request must be made by the Developer Console project of the OAuth client ID used to create the corresponding course work item. This method returns the following error codes: * PERMISSION_DENIED
if the requesting developer project did not create the corresponding course work, if the user is not permitted to make the requested modification to the student submission, or for access errors. * INVALID_ARGUMENT
if the request is malformed. * FAILED_PRECONDITION
if the requested course work has already been deleted. * NOT_FOUND
if the requested course, course work, or student submission does not exist.
§Arguments
request
- No description provided.courseId
- Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias.id
- Identifier of the course work.
sourcepub fn course_work_materials_create(
&self,
request: CourseWorkMaterial,
course_id: &str
) -> CourseCourseWorkMaterialCreateCall<'a, S>
pub fn course_work_materials_create( &self, request: CourseWorkMaterial, course_id: &str ) -> CourseCourseWorkMaterialCreateCall<'a, S>
Create a builder to help you perform the following task:
Creates a course work material. This method returns the following error codes: * PERMISSION_DENIED
if the requesting user is not permitted to access the requested course, create course work material in the requested course, share a Drive attachment, or for access errors. * INVALID_ARGUMENT
if the request is malformed or if more than 20 * materials are provided. * NOT_FOUND
if the requested course does not exist. * FAILED_PRECONDITION
for the following request error: * AttachmentNotVisible
§Arguments
request
- No description provided.courseId
- Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias.
sourcepub fn course_work_materials_delete(
&self,
course_id: &str,
id: &str
) -> CourseCourseWorkMaterialDeleteCall<'a, S>
pub fn course_work_materials_delete( &self, course_id: &str, id: &str ) -> CourseCourseWorkMaterialDeleteCall<'a, S>
Create a builder to help you perform the following task:
Deletes a course work material. This request must be made by the Developer Console project of the OAuth client ID used to create the corresponding course work material item. This method returns the following error codes: * PERMISSION_DENIED
if the requesting developer project did not create the corresponding course work material, if the requesting user is not permitted to delete the requested course or for access errors. * FAILED_PRECONDITION
if the requested course work material has already been deleted. * NOT_FOUND
if no course exists with the requested ID.
§Arguments
courseId
- Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias.id
- Identifier of the course work material to delete. This identifier is a Classroom-assigned identifier.
sourcepub fn course_work_materials_get(
&self,
course_id: &str,
id: &str
) -> CourseCourseWorkMaterialGetCall<'a, S>
pub fn course_work_materials_get( &self, course_id: &str, id: &str ) -> CourseCourseWorkMaterialGetCall<'a, S>
Create a builder to help you perform the following task:
Returns a course work material. This method returns the following error codes: * PERMISSION_DENIED
if the requesting user is not permitted to access the requested course or course work material, or for access errors. * INVALID_ARGUMENT
if the request is malformed. * NOT_FOUND
if the requested course or course work material does not exist.
§Arguments
courseId
- Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias.id
- Identifier of the course work material.
sourcepub fn course_work_materials_list(
&self,
course_id: &str
) -> CourseCourseWorkMaterialListCall<'a, S>
pub fn course_work_materials_list( &self, course_id: &str ) -> CourseCourseWorkMaterialListCall<'a, S>
Create a builder to help you perform the following task:
Returns a list of course work material that the requester is permitted to view. Course students may only view PUBLISHED
course work material. Course teachers and domain administrators may view all course work material. This method returns the following error codes: * PERMISSION_DENIED
if the requesting user is not permitted to access the requested course or for access errors. * INVALID_ARGUMENT
if the request is malformed. * NOT_FOUND
if the requested course does not exist.
§Arguments
courseId
- Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias.
sourcepub fn course_work_materials_patch(
&self,
request: CourseWorkMaterial,
course_id: &str,
id: &str
) -> CourseCourseWorkMaterialPatchCall<'a, S>
pub fn course_work_materials_patch( &self, request: CourseWorkMaterial, course_id: &str, id: &str ) -> CourseCourseWorkMaterialPatchCall<'a, S>
Create a builder to help you perform the following task:
Updates one or more fields of a course work material. This method returns the following error codes: * PERMISSION_DENIED
if the requesting developer project for access errors. * INVALID_ARGUMENT
if the request is malformed. * FAILED_PRECONDITION
if the requested course work material has already been deleted. * NOT_FOUND
if the requested course or course work material does not exist
§Arguments
request
- No description provided.courseId
- Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias.id
- Identifier of the course work material.
sourcepub fn students_create(
&self,
request: Student,
course_id: &str
) -> CourseStudentCreateCall<'a, S>
pub fn students_create( &self, request: Student, course_id: &str ) -> CourseStudentCreateCall<'a, S>
Create a builder to help you perform the following task:
Adds a user as a student of a course. Domain administrators are permitted to directly add users within their domain as students to courses within their domain. Students are permitted to add themselves to a course using an enrollment code. This method returns the following error codes: * PERMISSION_DENIED
if the requesting user is not permitted to create students in this course or for access errors. * NOT_FOUND
if the requested course ID does not exist. * FAILED_PRECONDITION
if the requested user’s account is disabled, for the following request errors: * CourseMemberLimitReached * CourseNotModifiable * UserGroupsMembershipLimitReached * InactiveCourseOwner * ALREADY_EXISTS
if the user is already a student or teacher in the course.
§Arguments
request
- No description provided.courseId
- Identifier of the course to create the student in. This identifier can be either the Classroom-assigned identifier or an alias.
sourcepub fn students_delete(
&self,
course_id: &str,
user_id: &str
) -> CourseStudentDeleteCall<'a, S>
pub fn students_delete( &self, course_id: &str, user_id: &str ) -> CourseStudentDeleteCall<'a, S>
Create a builder to help you perform the following task:
Deletes a student of a course. This method returns the following error codes: * PERMISSION_DENIED
if the requesting user is not permitted to delete students of this course or for access errors. * NOT_FOUND
if no student of this course has the requested ID or if the course does not exist.
§Arguments
courseId
- Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias.userId
- Identifier of the student to delete. The identifier can be one of the following: * the numeric identifier for the user * the email address of the user * the string literal"me"
, indicating the requesting user
sourcepub fn students_get(
&self,
course_id: &str,
user_id: &str
) -> CourseStudentGetCall<'a, S>
pub fn students_get( &self, course_id: &str, user_id: &str ) -> CourseStudentGetCall<'a, S>
Create a builder to help you perform the following task:
Returns a student of a course. This method returns the following error codes: * PERMISSION_DENIED
if the requesting user is not permitted to view students of this course or for access errors. * NOT_FOUND
if no student of this course has the requested ID or if the course does not exist.
§Arguments
courseId
- Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias.userId
- Identifier of the student to return. The identifier can be one of the following: * the numeric identifier for the user * the email address of the user * the string literal"me"
, indicating the requesting user
sourcepub fn students_list(&self, course_id: &str) -> CourseStudentListCall<'a, S>
pub fn students_list(&self, course_id: &str) -> CourseStudentListCall<'a, S>
Create a builder to help you perform the following task:
Returns a list of students of this course that the requester is permitted to view. This method returns the following error codes: * NOT_FOUND
if the course does not exist. * PERMISSION_DENIED
for access errors.
§Arguments
courseId
- Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias.
sourcepub fn teachers_create(
&self,
request: Teacher,
course_id: &str
) -> CourseTeacherCreateCall<'a, S>
pub fn teachers_create( &self, request: Teacher, course_id: &str ) -> CourseTeacherCreateCall<'a, S>
Create a builder to help you perform the following task:
Creates a teacher of a course. Domain administrators are permitted to directly add users within their domain as teachers to courses within their domain. Non-admin users should send an Invitation instead. This method returns the following error codes: * PERMISSION_DENIED
if the requesting user is not permitted to create teachers in this course or for access errors. * NOT_FOUND
if the requested course ID does not exist. * FAILED_PRECONDITION
if the requested user’s account is disabled, for the following request errors: * CourseMemberLimitReached * CourseNotModifiable * CourseTeacherLimitReached * UserGroupsMembershipLimitReached * InactiveCourseOwner * ALREADY_EXISTS
if the user is already a teacher or student in the course.
§Arguments
request
- No description provided.courseId
- Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias.
sourcepub fn teachers_delete(
&self,
course_id: &str,
user_id: &str
) -> CourseTeacherDeleteCall<'a, S>
pub fn teachers_delete( &self, course_id: &str, user_id: &str ) -> CourseTeacherDeleteCall<'a, S>
Create a builder to help you perform the following task:
Removes the specified teacher from the specified course. This method returns the following error codes: * PERMISSION_DENIED
if the requesting user is not permitted to delete teachers of this course or for access errors. * NOT_FOUND
if no teacher of this course has the requested ID or if the course does not exist. * FAILED_PRECONDITION
if the requested ID belongs to the primary teacher of this course. * FAILED_PRECONDITION
if the requested ID belongs to the owner of the course Drive folder. * FAILED_PRECONDITION
if the course no longer has an active owner.
§Arguments
courseId
- Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias.userId
- Identifier of the teacher to delete. The identifier can be one of the following: * the numeric identifier for the user * the email address of the user * the string literal"me"
, indicating the requesting user
sourcepub fn teachers_get(
&self,
course_id: &str,
user_id: &str
) -> CourseTeacherGetCall<'a, S>
pub fn teachers_get( &self, course_id: &str, user_id: &str ) -> CourseTeacherGetCall<'a, S>
Create a builder to help you perform the following task:
Returns a teacher of a course. This method returns the following error codes: * PERMISSION_DENIED
if the requesting user is not permitted to view teachers of this course or for access errors. * NOT_FOUND
if no teacher of this course has the requested ID or if the course does not exist.
§Arguments
courseId
- Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias.userId
- Identifier of the teacher to return. The identifier can be one of the following: * the numeric identifier for the user * the email address of the user * the string literal"me"
, indicating the requesting user
sourcepub fn teachers_list(&self, course_id: &str) -> CourseTeacherListCall<'a, S>
pub fn teachers_list(&self, course_id: &str) -> CourseTeacherListCall<'a, S>
Create a builder to help you perform the following task:
Returns a list of teachers of this course that the requester is permitted to view. This method returns the following error codes: * NOT_FOUND
if the course does not exist. * PERMISSION_DENIED
for access errors.
§Arguments
courseId
- Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias.
sourcepub fn topics_create(
&self,
request: Topic,
course_id: &str
) -> CourseTopicCreateCall<'a, S>
pub fn topics_create( &self, request: Topic, course_id: &str ) -> CourseTopicCreateCall<'a, S>
Create a builder to help you perform the following task:
Creates a topic. This method returns the following error codes: * PERMISSION_DENIED
if the requesting user is not permitted to access the requested course, create a topic in the requested course, or for access errors. * INVALID_ARGUMENT
if the request is malformed. * NOT_FOUND
if the requested course does not exist.
§Arguments
request
- No description provided.courseId
- Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias.
sourcepub fn topics_delete(
&self,
course_id: &str,
id: &str
) -> CourseTopicDeleteCall<'a, S>
pub fn topics_delete( &self, course_id: &str, id: &str ) -> CourseTopicDeleteCall<'a, S>
Create a builder to help you perform the following task:
Deletes a topic. This method returns the following error codes: * PERMISSION_DENIED
if the requesting user is not allowed to delete the requested topic or for access errors. * FAILED_PRECONDITION
if the requested topic has already been deleted. * NOT_FOUND
if no course or topic exists with the requested ID.
§Arguments
courseId
- Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias.id
- Identifier of the topic to delete.
sourcepub fn topics_get(&self, course_id: &str, id: &str) -> CourseTopicGetCall<'a, S>
pub fn topics_get(&self, course_id: &str, id: &str) -> CourseTopicGetCall<'a, S>
Create a builder to help you perform the following task:
Returns a topic. This method returns the following error codes: * PERMISSION_DENIED
if the requesting user is not permitted to access the requested course or topic, or for access errors. * INVALID_ARGUMENT
if the request is malformed. * NOT_FOUND
if the requested course or topic does not exist.
§Arguments
courseId
- Identifier of the course.id
- Identifier of the topic.
sourcepub fn topics_list(&self, course_id: &str) -> CourseTopicListCall<'a, S>
pub fn topics_list(&self, course_id: &str) -> CourseTopicListCall<'a, S>
Create a builder to help you perform the following task:
Returns the list of topics that the requester is permitted to view. This method returns the following error codes: * PERMISSION_DENIED
if the requesting user is not permitted to access the requested course or for access errors. * INVALID_ARGUMENT
if the request is malformed. * NOT_FOUND
if the requested course does not exist.
§Arguments
courseId
- Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias.
sourcepub fn topics_patch(
&self,
request: Topic,
course_id: &str,
id: &str
) -> CourseTopicPatchCall<'a, S>
pub fn topics_patch( &self, request: Topic, course_id: &str, id: &str ) -> CourseTopicPatchCall<'a, S>
Create a builder to help you perform the following task:
Updates one or more fields of a topic. This method returns the following error codes: * PERMISSION_DENIED
if the requesting developer project did not create the corresponding topic or for access errors. * INVALID_ARGUMENT
if the request is malformed. * NOT_FOUND
if the requested course or topic does not exist
§Arguments
request
- No description provided.courseId
- Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias.id
- Identifier of the topic.
sourcepub fn create(&self, request: Course) -> CourseCreateCall<'a, S>
pub fn create(&self, request: Course) -> CourseCreateCall<'a, S>
Create a builder to help you perform the following task:
Creates a course. The user specified in ownerId
is the owner of the created course and added as a teacher. A non-admin requesting user can only create a course with themselves as the owner. Domain admins can create courses owned by any user within their domain. This method returns the following error codes: * PERMISSION_DENIED
if the requesting user is not permitted to create courses or for access errors. * NOT_FOUND
if the primary teacher is not a valid user. * FAILED_PRECONDITION
if the course owner’s account is disabled or for the following request errors: * UserCannotOwnCourse * UserGroupsMembershipLimitReached * ALREADY_EXISTS
if an alias was specified in the id
and already exists.
§Arguments
request
- No description provided.
sourcepub fn delete(&self, id: &str) -> CourseDeleteCall<'a, S>
pub fn delete(&self, id: &str) -> CourseDeleteCall<'a, S>
Create a builder to help you perform the following task:
Deletes a course. This method returns the following error codes: * PERMISSION_DENIED
if the requesting user is not permitted to delete the requested course or for access errors. * NOT_FOUND
if no course exists with the requested ID.
§Arguments
id
- Identifier of the course to delete. This identifier can be either the Classroom-assigned identifier or an alias.
sourcepub fn get(&self, id: &str) -> CourseGetCall<'a, S>
pub fn get(&self, id: &str) -> CourseGetCall<'a, S>
Create a builder to help you perform the following task:
Returns a course. This method returns the following error codes: * PERMISSION_DENIED
if the requesting user is not permitted to access the requested course or for access errors. * NOT_FOUND
if no course exists with the requested ID.
§Arguments
id
- Identifier of the course to return. This identifier can be either the Classroom-assigned identifier or an alias.
sourcepub fn list(&self) -> CourseListCall<'a, S>
pub fn list(&self) -> CourseListCall<'a, S>
Create a builder to help you perform the following task:
Returns a list of courses that the requesting user is permitted to view, restricted to those that match the request. Returned courses are ordered by creation time, with the most recently created coming first. This method returns the following error codes: * PERMISSION_DENIED
for access errors. * INVALID_ARGUMENT
if the query argument is malformed. * NOT_FOUND
if any users specified in the query arguments do not exist.
sourcepub fn patch(&self, request: Course, id: &str) -> CoursePatchCall<'a, S>
pub fn patch(&self, request: Course, id: &str) -> CoursePatchCall<'a, S>
Create a builder to help you perform the following task:
Updates one or more fields in a course. This method returns the following error codes: * PERMISSION_DENIED
if the requesting user is not permitted to modify the requested course or for access errors. * NOT_FOUND
if no course exists with the requested ID. * INVALID_ARGUMENT
if invalid fields are specified in the update mask or if no update mask is supplied. * FAILED_PRECONDITION
for the following request errors: * CourseNotModifiable * InactiveCourseOwner * IneligibleOwner
§Arguments
request
- No description provided.id
- Identifier of the course to update. This identifier can be either the Classroom-assigned identifier or an alias.
sourcepub fn update(&self, request: Course, id: &str) -> CourseUpdateCall<'a, S>
pub fn update(&self, request: Course, id: &str) -> CourseUpdateCall<'a, S>
Create a builder to help you perform the following task:
Updates a course. This method returns the following error codes: * PERMISSION_DENIED
if the requesting user is not permitted to modify the requested course or for access errors. * NOT_FOUND
if no course exists with the requested ID. * FAILED_PRECONDITION
for the following request errors: * CourseNotModifiable
§Arguments
request
- No description provided.id
- Identifier of the course to update. This identifier can be either the Classroom-assigned identifier or an alias.