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

Contents

Description

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

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
Eq CoursesAnnouncementsCreate Source # 
Instance details

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

Data CoursesAnnouncementsCreate Source # 
Instance details

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

Methods

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

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

toConstr :: CoursesAnnouncementsCreate -> Constr #

dataTypeOf :: CoursesAnnouncementsCreate -> DataType #

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

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

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

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

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

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

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

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

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

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

Show CoursesAnnouncementsCreate Source # 
Instance details

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

Generic CoursesAnnouncementsCreate Source # 
Instance details

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

Associated Types

type Rep CoursesAnnouncementsCreate :: Type -> Type #

GoogleRequest CoursesAnnouncementsCreate Source # 
Instance details

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

type Rep CoursesAnnouncementsCreate Source # 
Instance details

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

type Rep CoursesAnnouncementsCreate = D1 (MetaData "CoursesAnnouncementsCreate" "Network.Google.Resource.Classroom.Courses.Announcements.Create" "gogol-classroom-0.4.0-8aa8kYGMMJyCKn01TYMpOR" False) (C1 (MetaCons "CoursesAnnouncementsCreate'" PrefixI True) ((S1 (MetaSel (Just "_couXgafv") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Xgafv)) :*: (S1 (MetaSel (Just "_couUploadProtocol") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text)) :*: S1 (MetaSel (Just "_couCourseId") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Text))) :*: ((S1 (MetaSel (Just "_couAccessToken") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text)) :*: S1 (MetaSel (Just "_couUploadType") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text))) :*: (S1 (MetaSel (Just "_couPayload") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Announcement) :*: S1 (MetaSel (Just "_couCallback") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text))))))
type Scopes CoursesAnnouncementsCreate Source # 
Instance details

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

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

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

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.

couUploadType :: Lens' CoursesAnnouncementsCreate (Maybe Text) Source #

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