Copyright | (c) Jon Schoning 2015 |
---|---|
Maintainer | jonschoning@gmail.com |
Stability | experimental |
Portability | POSIX |
Safe Haskell | None |
Language | Haskell2010 |
Synopsis
- type PinboardEnv = (PinboardConfig, Manager)
- type PinboardT m a = ReaderT PinboardEnv (LoggingT m) a
- runPinboardT :: MonadUnliftIO m => PinboardEnv -> PinboardT m a -> m a
- type MonadPinboard m = (MonadUnliftIO m, MonadReader PinboardEnv m, MonadLogger m)
- type ExecLoggingT = forall m. MonadIO m => forall a. LoggingT m a -> m a
- data PinboardConfig = PinboardConfig {
- apiToken :: !ByteString
- maxRequestRateMills :: !Int
- lastRequestTime :: IORef UTCTime
- doThreadDelay :: PinboardConfig -> IO ()
- execLoggingT :: ExecLoggingT
- filterLoggingT :: LogSource -> LogLevel -> Bool
- runConfigLoggingT :: PinboardConfig -> ExecLoggingT
- data PinboardRequest = PinboardRequest {
- requestPath :: !Text
- requestParams :: [Param]
- data ResultFormatType
- data Param
- type ParamsBS = [(ByteString, ByteString)]
Documentation
type PinboardEnv = (PinboardConfig, Manager) Source #
runPinboardT :: MonadUnliftIO m => PinboardEnv -> PinboardT m a -> m a Source #
type MonadPinboard m = (MonadUnliftIO m, MonadReader PinboardEnv m, MonadLogger m) Source #
Typeclass alias for the return type of the API functions (keeps the signatures less verbose)
type ExecLoggingT = forall m. MonadIO m => forall a. LoggingT m a -> m a Source #
data PinboardConfig Source #
PinboardConfig | |
|
Instances
Show PinboardConfig Source # | |
Defined in Pinboard.Types showsPrec :: Int -> PinboardConfig -> ShowS # show :: PinboardConfig -> String # showList :: [PinboardConfig] -> ShowS # |
data PinboardRequest Source #
PinboardRequest | |
|
Instances
Show PinboardRequest Source # | |
Defined in Pinboard.Types showsPrec :: Int -> PinboardRequest -> ShowS # show :: PinboardRequest -> String # showList :: [PinboardRequest] -> ShowS # |
data ResultFormatType Source #
Instances
Eq ResultFormatType Source # | |
Defined in Pinboard.Types (==) :: ResultFormatType -> ResultFormatType -> Bool # (/=) :: ResultFormatType -> ResultFormatType -> Bool # | |
Show ResultFormatType Source # | |
Defined in Pinboard.Types showsPrec :: Int -> ResultFormatType -> ShowS # show :: ResultFormatType -> String # showList :: [ResultFormatType] -> ShowS # |
type ParamsBS = [(ByteString, ByteString)] Source #