Copyright | (c) 2015-2016 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay@gmail.com> |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
Language | Haskell2010 |
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
- type CoursesStudentsCreateResource = "v1" :> ("courses" :> (Capture "courseId" Text :> ("students" :> (QueryParam "$.xgafv" Xgafv :> (QueryParam "upload_protocol" Text :> (QueryParam "access_token" Text :> (QueryParam "uploadType" Text :> (QueryParam "enrollmentCode" Text :> (QueryParam "callback" Text :> (QueryParam "alt" AltJSON :> (ReqBody '[JSON] Student :> Post '[JSON] Student)))))))))))
- coursesStudentsCreate :: Text -> Student -> CoursesStudentsCreate
- data CoursesStudentsCreate
- cscXgafv :: Lens' CoursesStudentsCreate (Maybe Xgafv)
- cscUploadProtocol :: Lens' CoursesStudentsCreate (Maybe Text)
- cscCourseId :: Lens' CoursesStudentsCreate Text
- cscAccessToken :: Lens' CoursesStudentsCreate (Maybe Text)
- cscUploadType :: Lens' CoursesStudentsCreate (Maybe Text)
- cscPayload :: Lens' CoursesStudentsCreate Student
- cscEnrollmentCode :: Lens' CoursesStudentsCreate (Maybe Text)
- cscCallback :: Lens' CoursesStudentsCreate (Maybe Text)
REST Resource
type CoursesStudentsCreateResource = "v1" :> ("courses" :> (Capture "courseId" Text :> ("students" :> (QueryParam "$.xgafv" Xgafv :> (QueryParam "upload_protocol" Text :> (QueryParam "access_token" Text :> (QueryParam "uploadType" Text :> (QueryParam "enrollmentCode" 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.
Instances
Request Lenses
cscUploadProtocol :: Lens' CoursesStudentsCreate (Maybe Text) Source #
Upload protocol for media (e.g. "raw", "multipart").
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.
cscAccessToken :: Lens' CoursesStudentsCreate (Maybe Text) Source #
OAuth access token.
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.
cscCallback :: Lens' CoursesStudentsCreate (Maybe Text) Source #
JSONP