-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Google APIs for server to server applications -- -- This library provides a way to use Google API for server to server -- applications. @package google-server-api @version 0.3.1.1 -- | Define data types to represent all of the requests that are sent to -- the API. module Google.Form data CalendarEvent CalendarEvent :: Account -> [Account] -> Text -> Text -> DateTime -> DateTime -> CalendarEvent [$sel:creator:CalendarEvent] :: CalendarEvent -> Account [$sel:attendees:CalendarEvent] :: CalendarEvent -> [Account] [$sel:summary:CalendarEvent] :: CalendarEvent -> Text [$sel:description:CalendarEvent] :: CalendarEvent -> Text [$sel:start:CalendarEvent] :: CalendarEvent -> DateTime [$sel:end:CalendarEvent] :: CalendarEvent -> DateTime data GmailSend GmailSend :: Text -> GmailSend [$sel:raw:GmailSend] :: GmailSend -> Text data Account Account :: Text -> Account [$sel:email:Account] :: Account -> Text newtype DateTime DateTime :: UTCTime -> DateTime [$sel:dateTime:DateTime] :: DateTime -> UTCTime data Email Email :: Text -> Text -> Maybe Text -> [Text] -> Text -> Text -> Email [$sel:to:Email] :: Email -> Text [$sel:from:Email] :: Email -> Text [$sel:replyTo:Email] :: Email -> Maybe Text [$sel:ccs:Email] :: Email -> [Text] [$sel:subject:Email] :: Email -> Text [$sel:body:Email] :: Email -> Text toMail :: Email -> IO Mail data Token Token :: Text -> Text -> Token [$sel:grantType:Token] :: Token -> Text [$sel:assertion:Token] :: Token -> Text instance Data.Aeson.Types.ToJSON.ToJSON Google.Form.GmailSend instance Data.Aeson.Types.FromJSON.FromJSON Google.Form.GmailSend instance GHC.Show.Show Google.Form.GmailSend instance GHC.Generics.Generic Google.Form.GmailSend instance GHC.Classes.Eq Google.Form.GmailSend instance Data.Aeson.Types.ToJSON.ToJSON Google.Form.Email instance Data.Aeson.Types.FromJSON.FromJSON Google.Form.Email instance GHC.Show.Show Google.Form.Email instance GHC.Generics.Generic Google.Form.Email instance GHC.Classes.Eq Google.Form.Email instance GHC.Show.Show Google.Form.Token instance GHC.Generics.Generic Google.Form.Token instance GHC.Classes.Eq Google.Form.Token instance Web.Internal.FormUrlEncoded.ToForm Google.Form.Token instance Data.Aeson.Types.ToJSON.ToJSON Google.Form.CalendarEvent instance Data.Aeson.Types.FromJSON.FromJSON Google.Form.CalendarEvent instance GHC.Show.Show Google.Form.CalendarEvent instance GHC.Generics.Generic Google.Form.CalendarEvent instance GHC.Classes.Eq Google.Form.CalendarEvent instance Data.Aeson.Types.ToJSON.ToJSON Google.Form.DateTime instance Data.Aeson.Types.FromJSON.FromJSON Google.Form.DateTime instance Web.Internal.HttpApiData.ToHttpApiData Google.Form.DateTime instance GHC.Show.Show Google.Form.DateTime instance GHC.Generics.Generic Google.Form.DateTime instance GHC.Classes.Eq Google.Form.DateTime instance Data.Aeson.Types.ToJSON.ToJSON Google.Form.Account instance Data.Aeson.Types.FromJSON.FromJSON Google.Form.Account instance Data.String.IsString Google.Form.Account instance GHC.Show.Show Google.Form.Account instance GHC.Generics.Generic Google.Form.Account instance GHC.Classes.Eq Google.Form.Account -- | Create a signed JWT needed to make the access token request to gain -- access to Google APIs for server to server applications. -- -- For all usage details, see -- https://developers.google.com/identity/protocols/OAuth2ServiceAccount -- -- This module is borrowed from google-oauth2-jwt package. module Google.JWT data JWT class HasJWT a getJwt :: HasJWT a => a -> JWT readServiceKeyFile :: FilePath -> IO (Maybe JWT) newtype SignedJWT SignedJWT :: ByteString -> SignedJWT [$sel:unSignedJWT:SignedJWT] :: SignedJWT -> ByteString newtype Email Email :: Text -> Email [$sel:unEmail:Email] :: Email -> Text data Scope ScopeCalendarFull :: Scope ScopeCalendarRead :: Scope ScopeGmailSend :: Scope -- | Create the signed JWT ready for transmission in the access token -- request as assertion value. -- --
--   grant_type=urn%3Aietf%3Aparams%3Aoauth%3Agrant-type%3Ajwt-bearer&assertion=
--   
getSignedJWT :: JWT -> Maybe Email -> [Scope] -> Maybe Int -> IO (Either String SignedJWT) instance GHC.Classes.Ord Google.JWT.Scope instance GHC.Read.Read Google.JWT.Scope instance GHC.Show.Show Google.JWT.Scope instance GHC.Classes.Eq Google.JWT.Scope instance GHC.Read.Read Google.JWT.JWT instance GHC.Show.Show Google.JWT.JWT instance GHC.Classes.Eq Google.JWT.JWT instance GHC.Classes.Ord Google.JWT.Email instance GHC.Read.Read Google.JWT.Email instance GHC.Show.Show Google.JWT.Email instance GHC.Classes.Eq Google.JWT.Email instance GHC.Classes.Ord Google.JWT.SignedJWT instance GHC.Read.Read Google.JWT.SignedJWT instance GHC.Show.Show Google.JWT.SignedJWT instance GHC.Classes.Eq Google.JWT.SignedJWT instance Google.JWT.HasJWT Google.JWT.JWT -- | Define data types to represent all of the responses that are received -- from the Google API. module Google.Response data Token Token :: Text -> Text -> Int -> Token [$sel:accessToken:Token] :: Token -> Text [$sel:tokenType:Token] :: Token -> Text [$sel:expiresIn:Token] :: Token -> Int newtype Account Account :: Text -> Account [$sel:email:Account] :: Account -> Text newtype DateTime DateTime :: UTCTime -> DateTime [$sel:dateTime:DateTime] :: DateTime -> UTCTime newtype ZonedDateTime ZonedDateTime :: Maybe ZonedTime -> ZonedDateTime [$sel:dateTime:ZonedDateTime] :: ZonedDateTime -> Maybe ZonedTime data CalendarEvent CalendarEvent :: Text -> Account -> Maybe [Account] -> Maybe Text -> Maybe Text -> Maybe ZonedDateTime -> Maybe ZonedDateTime -> CalendarEvent [$sel:status:CalendarEvent] :: CalendarEvent -> Text [$sel:creator:CalendarEvent] :: CalendarEvent -> Account [$sel:attendees:CalendarEvent] :: CalendarEvent -> Maybe [Account] [$sel:summary:CalendarEvent] :: CalendarEvent -> Maybe Text [$sel:description:CalendarEvent] :: CalendarEvent -> Maybe Text [$sel:start:CalendarEvent] :: CalendarEvent -> Maybe ZonedDateTime [$sel:end:CalendarEvent] :: CalendarEvent -> Maybe ZonedDateTime data CalendarEventList CalendarEventList :: Text -> Text -> [CalendarEvent] -> CalendarEventList [$sel:kind:CalendarEventList] :: CalendarEventList -> Text [$sel:summary:CalendarEventList] :: CalendarEventList -> Text [$sel:items:CalendarEventList] :: CalendarEventList -> [CalendarEvent] data GmailSend GmailSend :: Text -> GmailSend [$sel:id:GmailSend] :: GmailSend -> Text instance Data.Aeson.Types.ToJSON.ToJSON Google.Response.GmailSend instance Data.Aeson.Types.FromJSON.FromJSON Google.Response.GmailSend instance Web.Internal.FormUrlEncoded.FromForm Google.Response.GmailSend instance Web.Internal.FormUrlEncoded.ToForm Google.Response.GmailSend instance GHC.Show.Show Google.Response.GmailSend instance GHC.Generics.Generic Google.Response.GmailSend instance GHC.Classes.Eq Google.Response.GmailSend instance Data.Aeson.Types.ToJSON.ToJSON Google.Response.CalendarEventList instance Data.Aeson.Types.FromJSON.FromJSON Google.Response.CalendarEventList instance GHC.Show.Show Google.Response.CalendarEventList instance GHC.Generics.Generic Google.Response.CalendarEventList instance GHC.Classes.Eq Google.Response.CalendarEventList instance Data.Aeson.Types.ToJSON.ToJSON Google.Response.CalendarEvent instance Data.Aeson.Types.FromJSON.FromJSON Google.Response.CalendarEvent instance Web.Internal.FormUrlEncoded.FromForm Google.Response.CalendarEvent instance Web.Internal.FormUrlEncoded.ToForm Google.Response.CalendarEvent instance GHC.Show.Show Google.Response.CalendarEvent instance GHC.Generics.Generic Google.Response.CalendarEvent instance GHC.Classes.Eq Google.Response.CalendarEvent instance Data.Aeson.Types.ToJSON.ToJSON Google.Response.ZonedDateTime instance Data.Aeson.Types.FromJSON.FromJSON Google.Response.ZonedDateTime instance GHC.Classes.Eq Google.Response.ZonedDateTime instance Web.Internal.HttpApiData.ToHttpApiData Google.Response.ZonedDateTime instance Web.Internal.HttpApiData.FromHttpApiData Google.Response.ZonedDateTime instance GHC.Show.Show Google.Response.ZonedDateTime instance GHC.Generics.Generic Google.Response.ZonedDateTime instance Data.Aeson.Types.ToJSON.ToJSON Google.Response.DateTime instance Data.Aeson.Types.FromJSON.FromJSON Google.Response.DateTime instance Web.Internal.HttpApiData.ToHttpApiData Google.Response.DateTime instance Web.Internal.HttpApiData.FromHttpApiData Google.Response.DateTime instance GHC.Show.Show Google.Response.DateTime instance GHC.Generics.Generic Google.Response.DateTime instance GHC.Classes.Eq Google.Response.DateTime instance Data.Aeson.Types.ToJSON.ToJSON Google.Response.Account instance Data.Aeson.Types.FromJSON.FromJSON Google.Response.Account instance Web.Internal.HttpApiData.FromHttpApiData [Google.Response.Account] instance Web.Internal.HttpApiData.ToHttpApiData [Google.Response.Account] instance Web.Internal.HttpApiData.ToHttpApiData Google.Response.Account instance Web.Internal.HttpApiData.FromHttpApiData Google.Response.Account instance GHC.Show.Show Google.Response.Account instance GHC.Generics.Generic Google.Response.Account instance GHC.Classes.Eq Google.Response.Account instance Data.Aeson.Types.ToJSON.ToJSON Google.Response.Token instance Data.Aeson.Types.FromJSON.FromJSON Google.Response.Token instance Web.Internal.FormUrlEncoded.FromForm Google.Response.Token instance Web.Internal.FormUrlEncoded.ToForm Google.Response.Token instance GHC.Show.Show Google.Response.Token instance GHC.Generics.Generic Google.Response.Token instance GHC.Classes.Eq Google.Response.Token -- | Define functions to call Google APIs. module Google.Client getToken :: Maybe Email -> JWT -> [Scope] -> IO (Either ClientError Token) getCalendarEventList :: Token -> Text -> Maybe Bool -> Maybe DateTime -> Maybe DateTime -> Maybe Text -> IO (Either ClientError CalendarEventList) postCalendarEvent :: Token -> CalendarEvent -> IO (Either ClientError CalendarEvent) postGmailSend :: Token -> Email -> IO (Either ClientError GmailSend) instance Data.Aeson.Types.ToJSON.ToJSON Google.Client.Bearer instance Web.Internal.HttpApiData.ToHttpApiData Google.Client.Bearer instance GHC.Show.Show Google.Client.Bearer instance GHC.Classes.Ord Google.Client.Bearer instance GHC.Generics.Generic Google.Client.Bearer instance Data.Aeson.Types.FromJSON.FromJSON Google.Client.Bearer instance Web.Internal.HttpApiData.FromHttpApiData Google.Client.Bearer instance GHC.Classes.Eq Google.Client.Bearer instance Data.Data.Data Google.Client.Bearer