gogol-classroom-0.4.0: Google Classroom SDK.

Copyright(c) 2015-2016 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.CourseWork.Create

Contents

Description

Creates course work. The resulting course work (and corresponding student submissions) are associated with the Developer Console project of the OAuth client ID used to make the request. Classroom API requests to modify course work and student submissions must be made with an OAuth client ID from the associated Developer Console project. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to access the requested course, create course work in the requested course, share a Drive attachment, or for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the requested course does not exist. * `FAILED_PRECONDITION` for the following request error: * AttachmentNotVisible

See: Google Classroom API Reference for classroom.courses.courseWork.create.

Synopsis

REST Resource

type CoursesCourseWorkCreateResource = "v1" :> ("courses" :> (Capture "courseId" Text :> ("courseWork" :> (QueryParam "$.xgafv" Xgafv :> (QueryParam "upload_protocol" Text :> (QueryParam "access_token" Text :> (QueryParam "uploadType" Text :> (QueryParam "callback" Text :> (QueryParam "alt" AltJSON :> (ReqBody '[JSON] CourseWork :> Post '[JSON] CourseWork)))))))))) Source #

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

Creating a Request

coursesCourseWorkCreate Source #

Creates a value of CoursesCourseWorkCreate with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

data CoursesCourseWorkCreate Source #

Creates course work. The resulting course work (and corresponding student submissions) are associated with the Developer Console project of the OAuth client ID used to make the request. Classroom API requests to modify course work and student submissions must be made with an OAuth client ID from the associated Developer Console project. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to access the requested course, create course work in the requested course, share a Drive attachment, or for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the requested course does not exist. * `FAILED_PRECONDITION` for the following request error: * AttachmentNotVisible

See: coursesCourseWorkCreate smart constructor.

Instances
Eq CoursesCourseWorkCreate Source # 
Instance details

Defined in Network.Google.Resource.Classroom.Courses.CourseWork.Create

Data CoursesCourseWorkCreate Source # 
Instance details

Defined in Network.Google.Resource.Classroom.Courses.CourseWork.Create

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> CoursesCourseWorkCreate -> c CoursesCourseWorkCreate #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c CoursesCourseWorkCreate #

toConstr :: CoursesCourseWorkCreate -> Constr #

dataTypeOf :: CoursesCourseWorkCreate -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c CoursesCourseWorkCreate) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c CoursesCourseWorkCreate) #

gmapT :: (forall b. Data b => b -> b) -> CoursesCourseWorkCreate -> CoursesCourseWorkCreate #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> CoursesCourseWorkCreate -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> CoursesCourseWorkCreate -> r #

gmapQ :: (forall d. Data d => d -> u) -> CoursesCourseWorkCreate -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> CoursesCourseWorkCreate -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> CoursesCourseWorkCreate -> m CoursesCourseWorkCreate #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> CoursesCourseWorkCreate -> m CoursesCourseWorkCreate #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> CoursesCourseWorkCreate -> m CoursesCourseWorkCreate #

Show CoursesCourseWorkCreate Source # 
Instance details

Defined in Network.Google.Resource.Classroom.Courses.CourseWork.Create

Generic CoursesCourseWorkCreate Source # 
Instance details

Defined in Network.Google.Resource.Classroom.Courses.CourseWork.Create

Associated Types

type Rep CoursesCourseWorkCreate :: Type -> Type #

GoogleRequest CoursesCourseWorkCreate Source # 
Instance details

Defined in Network.Google.Resource.Classroom.Courses.CourseWork.Create

type Rep CoursesCourseWorkCreate Source # 
Instance details

Defined in Network.Google.Resource.Classroom.Courses.CourseWork.Create

type Rep CoursesCourseWorkCreate = D1 (MetaData "CoursesCourseWorkCreate" "Network.Google.Resource.Classroom.Courses.CourseWork.Create" "gogol-classroom-0.4.0-8aa8kYGMMJyCKn01TYMpOR" False) (C1 (MetaCons "CoursesCourseWorkCreate'" PrefixI True) ((S1 (MetaSel (Just "_ccwcXgafv") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Xgafv)) :*: (S1 (MetaSel (Just "_ccwcUploadProtocol") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text)) :*: S1 (MetaSel (Just "_ccwcCourseId") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Text))) :*: ((S1 (MetaSel (Just "_ccwcAccessToken") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text)) :*: S1 (MetaSel (Just "_ccwcUploadType") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text))) :*: (S1 (MetaSel (Just "_ccwcPayload") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 CourseWork) :*: S1 (MetaSel (Just "_ccwcCallback") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text))))))
type Scopes CoursesCourseWorkCreate Source # 
Instance details

Defined in Network.Google.Resource.Classroom.Courses.CourseWork.Create

type Scopes CoursesCourseWorkCreate = "https://www.googleapis.com/auth/classroom.coursework.students" ': ([] :: [Symbol])
type Rs CoursesCourseWorkCreate Source # 
Instance details

Defined in Network.Google.Resource.Classroom.Courses.CourseWork.Create

Request Lenses

ccwcUploadProtocol :: Lens' CoursesCourseWorkCreate (Maybe Text) Source #

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

ccwcCourseId :: Lens' CoursesCourseWorkCreate Text Source #

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

ccwcUploadType :: Lens' CoursesCourseWorkCreate (Maybe Text) Source #

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