| Copyright | (c) Jon Schoning |
|---|---|
| Maintainer | jonschoning@gmail.com |
| Stability | experimental |
| Portability | POSIX |
| Safe Haskell | None |
| Language | Haskell2010 |
Pinboard.Client
Contents
Description
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
data PinboardConfig Source
Constructors
| PinboardConfig | |
Fields
| |
Instances
Client Dependencies
module Pinboard.Client.Error
module Pinboard.Client.Types
module Pinboard.Client.Util