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.Teachers.Create

Contents

Description

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

REST Resource

type CoursesTeachersCreateResource = "v1" :> ("courses" :> (Capture "courseId" Text :> ("teachers" :> (QueryParam "$.xgafv" Text :> (QueryParam "upload_protocol" Text :> (QueryParam "pp" Bool :> (QueryParam "access_token" Text :> (QueryParam "uploadType" Text :> (QueryParam "bearer_token" 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.

Request Lenses

ctcUploadProtocol :: Lens' CoursesTeachersCreate (Maybe Text) Source

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

ctcPp :: Lens' CoursesTeachersCreate Bool Source

Pretty-print response.

ctcCourseId :: Lens' CoursesTeachersCreate Text Source

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

ctcUploadType :: Lens' CoursesTeachersCreate (Maybe Text) Source

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

ctcPayload :: Lens' CoursesTeachersCreate Teacher Source

Multipart request metadata.