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 |
Updates one or more fields in a course. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to modify the requested course or for access errors. * `NOT_FOUND` if no course exists with the requested ID. * `INVALID_ARGUMENT` if invalid fields are specified in the update mask or if no update mask is supplied. * `FAILED_PRECONDITION` for the following request errors: * CourseNotModifiable
See: Google Classroom API Reference for classroom.courses.patch
.
- type CoursesPatchResource = "v1" :> ("courses" :> (Capture "id" Text :> (QueryParam "$.xgafv" Text :> (QueryParam "upload_protocol" Text :> (QueryParam "updateMask" Text :> (QueryParam "pp" Bool :> (QueryParam "access_token" Text :> (QueryParam "uploadType" Text :> (QueryParam "bearer_token" Text :> (QueryParam "callback" Text :> (QueryParam "alt" AltJSON :> (ReqBody '[JSON] Course :> Patch '[JSON] Course))))))))))))
- coursesPatch :: Course -> Text -> CoursesPatch
- data CoursesPatch
- cpXgafv :: Lens' CoursesPatch (Maybe Text)
- cpUploadProtocol :: Lens' CoursesPatch (Maybe Text)
- cpUpdateMask :: Lens' CoursesPatch (Maybe Text)
- cpPp :: Lens' CoursesPatch Bool
- cpAccessToken :: Lens' CoursesPatch (Maybe Text)
- cpUploadType :: Lens' CoursesPatch (Maybe Text)
- cpPayload :: Lens' CoursesPatch Course
- cpBearerToken :: Lens' CoursesPatch (Maybe Text)
- cpId :: Lens' CoursesPatch Text
- cpCallback :: Lens' CoursesPatch (Maybe Text)
REST Resource
type CoursesPatchResource = "v1" :> ("courses" :> (Capture "id" Text :> (QueryParam "$.xgafv" Text :> (QueryParam "upload_protocol" Text :> (QueryParam "updateMask" Text :> (QueryParam "pp" Bool :> (QueryParam "access_token" Text :> (QueryParam "uploadType" Text :> (QueryParam "bearer_token" Text :> (QueryParam "callback" Text :> (QueryParam "alt" AltJSON :> (ReqBody '[JSON] Course :> Patch '[JSON] Course)))))))))))) Source #
A resource alias for classroom.courses.patch
method which the
CoursesPatch
request conforms to.
Creating a Request
:: Course | |
-> Text | |
-> CoursesPatch |
Creates a value of CoursesPatch
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
data CoursesPatch Source #
Updates one or more fields in a course. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to modify the requested course or for access errors. * `NOT_FOUND` if no course exists with the requested ID. * `INVALID_ARGUMENT` if invalid fields are specified in the update mask or if no update mask is supplied. * `FAILED_PRECONDITION` for the following request errors: * CourseNotModifiable
See: coursesPatch
smart constructor.
Request Lenses
cpUploadProtocol :: Lens' CoursesPatch (Maybe Text) Source #
Upload protocol for media (e.g. "raw", "multipart").
cpUpdateMask :: Lens' CoursesPatch (Maybe Text) Source #
Mask that identifies which fields on the course to update. This field is required to do an update. The update will fail if invalid fields are specified. The following fields are valid: * `name` * `section` * `descriptionHeading` * `description` * `room` * `courseState` When set in a query parameter, this field should be specified as `updateMask=,,...`
cpAccessToken :: Lens' CoursesPatch (Maybe Text) Source #
OAuth access token.
cpUploadType :: Lens' CoursesPatch (Maybe Text) Source #
Legacy upload protocol for media (e.g. "media", "multipart").
cpBearerToken :: Lens' CoursesPatch (Maybe Text) Source #
OAuth bearer token.
cpId :: Lens' CoursesPatch Text Source #
Identifier of the course to update. This identifier can be either the Classroom-assigned identifier or an alias.
cpCallback :: Lens' CoursesPatch (Maybe Text) Source #
JSONP