packages feed

tonatona-google-server-api 0.1.0.0 → 0.1.1.0

raw patch · 3 files changed

+22/−10 lines, 3 filesdep ~google-server-apiPVP ok

version bump matches the API change (PVP)

Dependency ranges changed: google-server-api

API changes (from Hackage documentation)

+ Tonatona.Google.Client: getCalendarEventList :: Text -> Maybe Bool -> Maybe DateTime -> Maybe DateTime -> Maybe Text -> Dsl env CalendarEventList

Files

src/Tonatona/Google.hs view
@@ -11,15 +11,12 @@ import Tonalude  import qualified Google.Client as Client-import qualified Google.Form as Form import Google.JWT (JWT) import qualified Google.JWT as JWT-import Google.Response (Token)-import qualified Google.Response as Response import Servant.Client (ServantError)  import Tonatona (HasConfig(..), HasParser(..))-import TonaParser (Parser, (.||), argLong, envVar, liftWith, requiredVal)+import TonaParser (Parser, (.||), argLong, envVar, requiredVal) import Tonatona.Google.Internal  -- | Main function.
src/Tonatona/Google/Client.hs view
@@ -4,7 +4,8 @@ Define functions to call Google APIs. -} module Tonatona.Google.Client-  ( postCalendarEvent+  ( getCalendarEventList+  , postCalendarEvent   , postGmailSend   ) where @@ -13,6 +14,20 @@ import qualified Google.Form as Form import qualified Google.Response as Response import Tonatona.Google.Internal+++getCalendarEventList ::+     Text+  -> Maybe Bool+  -> Maybe Form.DateTime+  -> Maybe Form.DateTime+  -> Maybe Text-> Dsl env Response.CalendarEventList+getCalendarEventList calendarId singleEvents timeMin timeMax orderBy = do+  t <- asks token+  res <- liftIO $ Client.getCalendarEventList t calendarId singleEvents timeMin timeMax orderBy+  case res of+    Left err -> throwM err+    Right resp -> pure resp  postCalendarEvent :: Form.CalendarEvent -> Dsl env Response.CalendarEvent postCalendarEvent event = do
tonatona-google-server-api.cabal view
@@ -2,10 +2,10 @@ -- -- see: https://github.com/sol/hpack ----- hash: e2a0ef2de7a9d61ded7db3682aa5bdc07fecf6f72db2398b73483e5061ff42ac+-- hash: fac284c01945c3a251b077bc1427890da305f1b84622b19a42992d3bbd4dc8cb  name:           tonatona-google-server-api-version:        0.1.0.0+version:        0.1.1.0 synopsis:       tonatona plugin for google-server-api description:    Tonatona plugin for [google-server-api](https://hackage.haskell.org/package/google-server-api). This package provides a tonatona plugin to use Google API for server to server applications. category:       Database, Library, Tonatona, Web@@ -40,7 +40,7 @@   ghc-options: -Wcompat -Wincomplete-record-updates -Wincomplete-uni-patterns -Wredundant-constraints   build-depends:       base >=4.7 && <5-    , google-server-api >=0.3+    , google-server-api >=0.3.1     , monad-logger >=0.3     , persistent >=2.8     , persistent-sqlite >=2.8@@ -62,7 +62,7 @@       Glob     , base >=4.7 && <5     , doctest-    , google-server-api >=0.3+    , google-server-api >=0.3.1     , monad-logger >=0.3     , persistent >=2.8     , persistent-sqlite >=2.8@@ -82,7 +82,7 @@   ghc-options: -Wcompat -Wincomplete-record-updates -Wincomplete-uni-patterns -Wredundant-constraints   build-depends:       base >=4.7 && <5-    , google-server-api >=0.3+    , google-server-api >=0.3.1     , monad-logger >=0.3     , persistent >=2.8     , persistent-sqlite >=2.8