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 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
- 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))))))))))
- coursesCourseWorkCreate :: Text -> CourseWork -> CoursesCourseWorkCreate
- data CoursesCourseWorkCreate
- ccwcXgafv :: Lens' CoursesCourseWorkCreate (Maybe Xgafv)
- ccwcUploadProtocol :: Lens' CoursesCourseWorkCreate (Maybe Text)
- ccwcCourseId :: Lens' CoursesCourseWorkCreate Text
- ccwcAccessToken :: Lens' CoursesCourseWorkCreate (Maybe Text)
- ccwcUploadType :: Lens' CoursesCourseWorkCreate (Maybe Text)
- ccwcPayload :: Lens' CoursesCourseWorkCreate CourseWork
- ccwcCallback :: Lens' CoursesCourseWorkCreate (Maybe Text)
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
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.
ccwcAccessToken :: Lens' CoursesCourseWorkCreate (Maybe Text) Source #
OAuth access token.
ccwcUploadType :: Lens' CoursesCourseWorkCreate (Maybe Text) Source #
Legacy upload protocol for media (e.g. "media", "multipart").
ccwcPayload :: Lens' CoursesCourseWorkCreate CourseWork Source #
Multipart request metadata.
ccwcCallback :: Lens' CoursesCourseWorkCreate (Maybe Text) Source #
JSONP