Copyright | (c) Jon Schoning, 2015 |
---|---|
Maintainer | jonschoning@gmail.com |
Stability | experimental |
Portability | POSIX |
Safe Haskell | None |
Language | Haskell2010 |
- pinboardJson :: FromJSON a => PinboardRequest -> Pinboard a
- runPinboardJson :: FromJSON a => PinboardConfig -> Pinboard a -> IO (Either PinboardError a)
- runPinboardSingleRaw :: PinboardConfig -> PinboardRequest -> (Response -> InputStream ByteString -> IO a) -> IO (Either PinboardError a)
- runPinboardSingleRawBS :: PinboardConfig -> PinboardRequest -> IO (Either PinboardError ByteString)
- runPinboardSingleJson :: FromJSON a => PinboardConfig -> PinboardRequest -> IO (Either PinboardError a)
- sendPinboardRequest :: PinboardRequest -> PinboardConfig -> Connection -> (Response -> InputStream ByteString -> IO a) -> IO a
- sendPinboardRequestBS :: PinboardRequest -> PinboardConfig -> Connection -> IO (Response, ByteString)
- connOpenRaw :: IO Connection
- connOpen :: IO (Either SomeException Connection)
- connClose :: Either a Connection -> IO ()
- connFail :: PinboardErrorType -> SomeException -> IO (Either PinboardError b)
- parseJSONResponseStream :: FromJSON a => Response -> InputStream ByteString -> IO (Response, Either PinboardError a)
- parseJSONFromStream :: FromJSON a => InputStream ByteString -> IO (Either PinboardError a)
- checkStatusCode :: StatusCode -> Either PinboardError ()
- addErrMsg :: Text -> PinboardError -> PinboardError
- createParserErr :: Text -> PinboardError
- httpStatusPinboardError :: PinboardErrorHTTPCode -> Either PinboardError a
Monadic
pinboardJson :: FromJSON a => PinboardRequest -> Pinboard a Source
runPinboardJson :: FromJSON a => PinboardConfig -> Pinboard a -> IO (Either PinboardError a) Source
Single
runPinboardSingleRaw :: PinboardConfig -> PinboardRequest -> (Response -> InputStream ByteString -> IO a) -> IO (Either PinboardError a) Source
runPinboardSingleRawBS :: PinboardConfig -> PinboardRequest -> IO (Either PinboardError ByteString) Source
runPinboardSingleJson :: FromJSON a => PinboardConfig -> PinboardRequest -> IO (Either PinboardError a) Source
Sending
sendPinboardRequest :: PinboardRequest -> PinboardConfig -> Connection -> (Response -> InputStream ByteString -> IO a) -> IO a Source
sendPinboardRequestBS :: PinboardRequest -> PinboardConfig -> Connection -> IO (Response, ByteString) Source
Connections
connClose :: Either a Connection -> IO () Source
connFail :: PinboardErrorType -> SomeException -> IO (Either PinboardError b) Source
JSON Streams
parseJSONResponseStream :: FromJSON a => Response -> InputStream ByteString -> IO (Response, Either PinboardError a) Source
parseJSONFromStream :: FromJSON a => InputStream ByteString -> IO (Either PinboardError a) Source
Status Codes
checkStatusCode :: StatusCode -> Either PinboardError () Source
Error Helpers
addErrMsg :: Text -> PinboardError -> PinboardError Source