gogol-classroom-0.0.1: Google Classroom SDK.

Copyright(c) 2015 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay@gmail.com>
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellNone
LanguageHaskell2010

Network.Google.Resource.Classroom.Courses.Students.Create

Contents

Description

Adds a user as a student of a course. 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 * `ALREADY_EXISTS` if the user is already a student or teacher in the course.

See: Google Classroom API Reference for classroom.courses.students.create.

Synopsis

REST Resource

type CoursesStudentsCreateResource = "v1" :> ("courses" :> (Capture "courseId" Text :> ("students" :> (QueryParam "$.xgafv" Text :> (QueryParam "upload_protocol" Text :> (QueryParam "pp" Bool :> (QueryParam "access_token" Text :> (QueryParam "uploadType" Text :> (QueryParam "enrollmentCode" Text :> (QueryParam "bearer_token" Text :> (QueryParam "callback" Text :> (QueryParam "alt" AltJSON :> (ReqBody `[JSON]` Student :> Post `[JSON]` Student))))))))))))) Source

A resource alias for classroom.courses.students.create method which the CoursesStudentsCreate request conforms to.

Creating a Request

coursesStudentsCreate Source

Creates a value of CoursesStudentsCreate with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

data CoursesStudentsCreate Source

Adds a user as a student of a course. 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 * `ALREADY_EXISTS` if the user is already a student or teacher in the course.

See: coursesStudentsCreate smart constructor.

Request Lenses

cscUploadProtocol :: Lens' CoursesStudentsCreate (Maybe Text) Source

Upload protocol for media (e.g. "raw", "multipart").

cscPp :: Lens' CoursesStudentsCreate Bool Source

Pretty-print response.

cscCourseId :: Lens' CoursesStudentsCreate Text Source

Identifier of the course to create the student in. This identifier can be either the Classroom-assigned identifier or an alias.

cscUploadType :: Lens' CoursesStudentsCreate (Maybe Text) Source

Legacy upload protocol for media (e.g. "media", "multipart").

cscPayload :: Lens' CoursesStudentsCreate Student Source

Multipart request metadata.

cscEnrollmentCode :: Lens' CoursesStudentsCreate (Maybe Text) Source

Enrollment code of the course to create the student in. This code is required if userId corresponds to the requesting user; it may be omitted if the requesting user has administrative permissions to create students for any user.