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 |
Creates a teacher of a course. 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 * `ALREADY_EXISTS` if the user is already a teacher or student in the course.
See: Google Classroom API Reference for classroom.courses.teachers.create
.
Synopsis
- type CoursesTeachersCreateResource = "v1" :> ("courses" :> (Capture "courseId" Text :> ("teachers" :> (QueryParam "$.xgafv" Xgafv :> (QueryParam "upload_protocol" Text :> (QueryParam "access_token" Text :> (QueryParam "uploadType" Text :> (QueryParam "callback" Text :> (QueryParam "alt" AltJSON :> (ReqBody '[JSON] Teacher :> Post '[JSON] Teacher))))))))))
- coursesTeachersCreate :: Text -> Teacher -> CoursesTeachersCreate
- data CoursesTeachersCreate
- ctcXgafv :: Lens' CoursesTeachersCreate (Maybe Xgafv)
- ctcUploadProtocol :: Lens' CoursesTeachersCreate (Maybe Text)
- ctcCourseId :: Lens' CoursesTeachersCreate Text
- ctcAccessToken :: Lens' CoursesTeachersCreate (Maybe Text)
- ctcUploadType :: Lens' CoursesTeachersCreate (Maybe Text)
- ctcPayload :: Lens' CoursesTeachersCreate Teacher
- ctcCallback :: Lens' CoursesTeachersCreate (Maybe Text)
REST Resource
type CoursesTeachersCreateResource = "v1" :> ("courses" :> (Capture "courseId" Text :> ("teachers" :> (QueryParam "$.xgafv" Xgafv :> (QueryParam "upload_protocol" Text :> (QueryParam "access_token" Text :> (QueryParam "uploadType" Text :> (QueryParam "callback" Text :> (QueryParam "alt" AltJSON :> (ReqBody '[JSON] Teacher :> Post '[JSON] Teacher)))))))))) Source #
A resource alias for classroom.courses.teachers.create
method which the
CoursesTeachersCreate
request conforms to.
Creating a Request
coursesTeachersCreate Source #
Creates a value of CoursesTeachersCreate
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
data CoursesTeachersCreate Source #
Creates a teacher of a course. 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 * `ALREADY_EXISTS` if the user is already a teacher or student in the course.
See: coursesTeachersCreate
smart constructor.
Instances
Request Lenses
ctcUploadProtocol :: Lens' CoursesTeachersCreate (Maybe Text) Source #
Upload protocol for media (e.g. "raw", "multipart").
ctcCourseId :: Lens' CoursesTeachersCreate Text Source #
Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias.
ctcAccessToken :: Lens' CoursesTeachersCreate (Maybe Text) Source #
OAuth access token.
ctcUploadType :: Lens' CoursesTeachersCreate (Maybe Text) Source #
Legacy upload protocol for media (e.g. "media", "multipart").
ctcPayload :: Lens' CoursesTeachersCreate Teacher Source #
Multipart request metadata.
ctcCallback :: Lens' CoursesTeachersCreate (Maybe Text) Source #
JSONP