Copyright | (c) Jon Schoning |
---|---|
Maintainer | jonschoning@gmail.com |
Stability | experimental |
Portability | POSIX |
Safe Haskell | None |
Language | Haskell2010 |
import Pinboard main :: IO () main = do let config = fromApiToken "api token" result <- runPinboardJson config $ getPostsRecent Nothing Nothing case result of Right details -> print details Left pinboardError -> print pinboardError
- runPinboardJson :: FromJSON a => PinboardConfig -> Pinboard a -> IO (Either PinboardError a)
- fromApiToken :: String -> PinboardConfig
- data PinboardConfig = PinboardConfig {
- apiToken :: ByteString
- debug :: Bool
- module Pinboard.Client.Error
- module Pinboard.Client.Types
- module Pinboard.Client.Util
Client
Executes the methods defined in Pinboard.Api
runPinboardJson :: FromJSON a => PinboardConfig -> Pinboard a -> IO (Either PinboardError a) Source
Create a default PinboardConfig using the supplied apiToken
The PinboardConfig provides authentication via apiToken
Client Dependencies
module Pinboard.Client.Error
module Pinboard.Client.Types
module Pinboard.Client.Util