api-builder-0.1.0.0: Library for easily building REST API wrappers in Haskell

Safe HaskellNone

APIBuilder.API

Documentation

type API s e a = EitherT (APIError e) (StateT Builder (StateT s IO)) aSource

liftEither :: API s e a -> API s e aSource

liftState :: StateT s IO a -> API s e aSource

runAPI :: Builder -> s -> API s e a -> IO (Either (APIError e) a)Source

runRoute :: (FromJSON a, FromJSON e) => Route -> API s e aSource

name :: Text -> API s e ()Source

baseURL :: Text -> API s e ()Source