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 an announcement. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to access the requested course, create announcements 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.announcements.create
.
Synopsis
- type CoursesAnnouncementsCreateResource = "v1" :> ("courses" :> (Capture "courseId" Text :> ("announcements" :> (QueryParam "$.xgafv" Xgafv :> (QueryParam "upload_protocol" Text :> (QueryParam "access_token" Text :> (QueryParam "uploadType" Text :> (QueryParam "callback" Text :> (QueryParam "alt" AltJSON :> (ReqBody '[JSON] Announcement :> Post '[JSON] Announcement))))))))))
- coursesAnnouncementsCreate :: Text -> Announcement -> CoursesAnnouncementsCreate
- data CoursesAnnouncementsCreate
- couXgafv :: Lens' CoursesAnnouncementsCreate (Maybe Xgafv)
- couUploadProtocol :: Lens' CoursesAnnouncementsCreate (Maybe Text)
- couCourseId :: Lens' CoursesAnnouncementsCreate Text
- couAccessToken :: Lens' CoursesAnnouncementsCreate (Maybe Text)
- couUploadType :: Lens' CoursesAnnouncementsCreate (Maybe Text)
- couPayload :: Lens' CoursesAnnouncementsCreate Announcement
- couCallback :: Lens' CoursesAnnouncementsCreate (Maybe Text)
REST Resource
type CoursesAnnouncementsCreateResource = "v1" :> ("courses" :> (Capture "courseId" Text :> ("announcements" :> (QueryParam "$.xgafv" Xgafv :> (QueryParam "upload_protocol" Text :> (QueryParam "access_token" Text :> (QueryParam "uploadType" Text :> (QueryParam "callback" Text :> (QueryParam "alt" AltJSON :> (ReqBody '[JSON] Announcement :> Post '[JSON] Announcement)))))))))) Source #
A resource alias for classroom.courses.announcements.create
method which the
CoursesAnnouncementsCreate
request conforms to.
Creating a Request
coursesAnnouncementsCreate Source #
Creates a value of CoursesAnnouncementsCreate
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
data CoursesAnnouncementsCreate Source #
Creates an announcement. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to access the requested course, create announcements 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: coursesAnnouncementsCreate
smart constructor.
Instances
Request Lenses
couUploadProtocol :: Lens' CoursesAnnouncementsCreate (Maybe Text) Source #
Upload protocol for media (e.g. "raw", "multipart").
couCourseId :: Lens' CoursesAnnouncementsCreate Text Source #
Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias.
couAccessToken :: Lens' CoursesAnnouncementsCreate (Maybe Text) Source #
OAuth access token.
couUploadType :: Lens' CoursesAnnouncementsCreate (Maybe Text) Source #
Legacy upload protocol for media (e.g. "media", "multipart").
couPayload :: Lens' CoursesAnnouncementsCreate Announcement Source #
Multipart request metadata.
couCallback :: Lens' CoursesAnnouncementsCreate (Maybe Text) Source #
JSONP