packages feed

pinboard 0.5 → 0.6

raw patch · 4 files changed

+15/−13 lines, 4 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

- Pinboard.Client: runPinboardJson :: FromJSON a => PinboardConfig -> Pinboard a -> IO (Either PinboardError a)
+ Pinboard.Client: runPinboard :: PinboardConfig -> Pinboard a -> IO (Either PinboardError a)

Files

pinboard.cabal view
@@ -1,5 +1,5 @@ name:                pinboard-version:             0.5+version:             0.6 synopsis:            Access to the Pinboard API license:             MIT license-file:        LICENSE@@ -25,7 +25,7 @@     > main :: IO ()     > main = do     >   let config = fromApiToken "api token"-    >   result <- runPinboardJson config $ getPostsRecent Nothing Nothing+    >   result <- runPinboard config $ getPostsRecent Nothing Nothing     >   case result of     >     Right details -> print details     >     Left pinboardError -> print pinboardError
src/Pinboard.hs view
@@ -12,7 +12,7 @@ -- main :: IO () -- main = do --   let config = fromApiToken "api token"---   result <- runPinboardJson config $ getPostsRecent Nothing Nothing+--   result <- runPinboard config $ getPostsRecent Nothing Nothing --   case result of --     Right details -> print details --     Left pinboardError -> print pinboardError@@ -23,8 +23,9 @@       -- | Executes the methods defined in Pinboard.Api       module Pinboard.Client        -- * Pinboard.Api-      -- | Provides Pinboard Api Methods+      -- | Provides Pinboard Api Access (deserializes into Haskell data structures)     , module Pinboard.Api+      -- | Alternate Request Builders     , module Pinboard.ApiRequest       -- * Pinboard.ApiTypes       -- | Pinboard Data Structures returned by the Api
src/Pinboard/Api.hs view
@@ -9,6 +9,8 @@ -- Portability : POSIX -- -- < https://pinboard.in/api/ >+--+-- Provides Pinboard Api Access (deserializes into Haskell data structures)  module Pinboard.Api     ( 
src/Pinboard/Client.hs view
@@ -18,8 +18,8 @@       fromApiToken       -- | The PinboardConfig provides authentication via apiToken     , PinboardConfig       (..)-      -- * Monadic, Json-    , runPinboardJson+      -- * Monadic+    , runPinboard     , pinboardJson       -- * Single     , runPinboardSingleRaw@@ -82,13 +82,12 @@ fromApiToken token = PinboardConfig { debug = False, apiToken = pack token }  ----------------------------------------------------------------------------------- | Execute computations from Pinboard.Api w/ json deserialization-runPinboardJson-    :: FromJSON a-    => PinboardConfig+-- | Execute computations in the Pinboard monad+runPinboard+    :: PinboardConfig     -> Pinboard a     -> IO (Either PinboardError a)-runPinboardJson config requests = withOpenSSL $+runPinboard config requests = withOpenSSL $   bracket connOpen connClose (either (connFail ConnectionFailure) go)   where go conn = runReaderT (runEitherT requests) (config, conn)                    `catch` connFail UnknownErrorType@@ -124,7 +123,7 @@     => PinboardConfig            -> PinboardRequest     -> IO (Either PinboardError a)-runPinboardSingleJson config = runPinboardJson config . pinboardJson+runPinboardSingleJson config = runPinboard config . pinboardJson   --------------------------------------------------------------------------------@@ -159,7 +158,7 @@ buildReq url = buildRequest $ do   http GET ("/v1/" <> url)   setHeader "Connection" "Keep-Alive"  -  setHeader "User-Agent" "pinboard.hs/0.4"  +  setHeader "User-Agent" "pinboard.hs/0.6"    --------------------------------------------------------------------------------