packages feed

fb 0.14.2 → 0.14.3

raw patch · 2 files changed

+23/−3 lines, 2 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

fb.cabal view
@@ -1,5 +1,5 @@ name:              fb-version:           0.14.2+version:           0.14.3 license:           BSD3 license-file:      LICENSE author:            Felipe Lessa
src/Facebook/Graph.hs view
@@ -2,6 +2,7 @@ module Facebook.Graph     ( getObject     , postObject+    , deleteObject     , searchObjects     , Pager(..)     , fetchNextPage@@ -65,10 +66,29 @@            -> [Argument]          -- ^ Arguments to be passed to Facebook            -> AccessToken anyKind -- ^ Access token            -> FacebookT Auth m a-postObject path query token =+postObject = methodObject HT.methodPost+++-- | Make a raw @DELETE@ request to Facebook's Graph API.+deleteObject :: (C.MonadResource m, MonadBaseControl IO m, A.FromJSON a) =>+                Text                -- ^ Path (should begin with a slash @\/@)+             -> [Argument]          -- ^ Arguments to be passed to Facebook+             -> AccessToken anyKind -- ^ Access token+             -> FacebookT Auth m a+deleteObject = methodObject HT.methodDelete+++-- | Helper function used by 'postObject' and 'deleteObject'.+methodObject :: (C.MonadResource m, MonadBaseControl IO m, A.FromJSON a) =>+                HT.Method+             -> Text                -- ^ Path (should begin with a slash @\/@)+             -> [Argument]          -- ^ Arguments to be passed to Facebook+             -> AccessToken anyKind -- ^ Access token+             -> FacebookT Auth m a+methodObject method path query token =   runResourceInFb $ do     req <- fbreq path (Just token) query-    asJson =<< fbhttp req { H.method = HT.methodPost }+    asJson =<< fbhttp req { H.method = method }   -- | Make a raw @GET@ request to the /search endpoint of Facebook’s