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 course. The user specified in `ownerId` is the owner of the created course and added as a teacher. 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: * UserGroupsMembershipLimitReached * `ALREADY_EXISTS` if an alias was specified in the `id` and already exists.
See: Google Classroom API Reference for classroom.courses.create
.
Synopsis
- type CoursesCreateResource = "v1" :> ("courses" :> (QueryParam "$.xgafv" Xgafv :> (QueryParam "upload_protocol" Text :> (QueryParam "access_token" Text :> (QueryParam "uploadType" Text :> (QueryParam "callback" Text :> (QueryParam "alt" AltJSON :> (ReqBody '[JSON] Course :> Post '[JSON] Course))))))))
- coursesCreate :: Course -> CoursesCreate
- data CoursesCreate
- ccXgafv :: Lens' CoursesCreate (Maybe Xgafv)
- ccUploadProtocol :: Lens' CoursesCreate (Maybe Text)
- ccAccessToken :: Lens' CoursesCreate (Maybe Text)
- ccUploadType :: Lens' CoursesCreate (Maybe Text)
- ccPayload :: Lens' CoursesCreate Course
- ccCallback :: Lens' CoursesCreate (Maybe Text)
REST Resource
type CoursesCreateResource = "v1" :> ("courses" :> (QueryParam "$.xgafv" Xgafv :> (QueryParam "upload_protocol" Text :> (QueryParam "access_token" Text :> (QueryParam "uploadType" Text :> (QueryParam "callback" Text :> (QueryParam "alt" AltJSON :> (ReqBody '[JSON] Course :> Post '[JSON] Course)))))))) Source #
A resource alias for classroom.courses.create
method which the
CoursesCreate
request conforms to.
Creating a Request
Creates a value of CoursesCreate
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
data CoursesCreate Source #
Creates a course. The user specified in `ownerId` is the owner of the created course and added as a teacher. 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: * UserGroupsMembershipLimitReached * `ALREADY_EXISTS` if an alias was specified in the `id` and already exists.
See: coursesCreate
smart constructor.
Instances
Request Lenses
ccUploadProtocol :: Lens' CoursesCreate (Maybe Text) Source #
Upload protocol for media (e.g. "raw", "multipart").
ccAccessToken :: Lens' CoursesCreate (Maybe Text) Source #
OAuth access token.
ccUploadType :: Lens' CoursesCreate (Maybe Text) Source #
Legacy upload protocol for media (e.g. "media", "multipart").
ccCallback :: Lens' CoursesCreate (Maybe Text) Source #
JSONP