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

Contents

Description

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

REST Resource

type CoursesCreateResource = "v1" :> ("courses" :> (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]` Course :> Post `[JSON]` Course)))))))))) Source

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

Creating a Request

coursesCreate Source

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.

Request Lenses

ccUploadProtocol :: Lens' CoursesCreate (Maybe Text) Source

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

ccPp :: Lens' CoursesCreate Bool Source

Pretty-print response.

ccUploadType :: Lens' CoursesCreate (Maybe Text) Source

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

ccPayload :: Lens' CoursesCreate Course Source

Multipart request metadata.