Safe Haskell | None |
---|---|
Language | Haskell2010 |
Smith Client top-level module.
Designed to be import qualified:
import qualified Smith.Client as Smith
Synopsis
- data Smith = Smith SmithEndpoint Manager Store
- data SmithScope
- configure :: IO (Either SmithConfigureError Smith)
- configureWith :: [SmithScope] -> Manager -> IO (Either SmithConfigureError Smith)
- configureT :: ExceptT SmithConfigureError IO Smith
- configureWithT :: [SmithScope] -> Manager -> ExceptT SmithConfigureError IO Smith
- data SmithConfigureError
- renderSmithConfigureError :: SmithConfigureError -> Text
- runRequest :: Smith -> Request a -> IO (Either SmithError a)
- runRequestT :: Smith -> Request a -> ExceptT SmithError IO a
- module Smith.Client.Api
Smith runtime data
Smith OAuth2 Scopes
data SmithScope Source #
Instances
Smith configuration operations.
configureWith :: [SmithScope] -> Manager -> IO (Either SmithConfigureError Smith) Source #
configureWithT :: [SmithScope] -> Manager -> ExceptT SmithConfigureError IO Smith Source #
Smith configuration errors and default handler.
data SmithConfigureError Source #
Instances
Eq SmithConfigureError Source # | |
Defined in Smith.Client.Config (==) :: SmithConfigureError -> SmithConfigureError -> Bool # (/=) :: SmithConfigureError -> SmithConfigureError -> Bool # | |
Ord SmithConfigureError Source # | |
Defined in Smith.Client.Config compare :: SmithConfigureError -> SmithConfigureError -> Ordering # (<) :: SmithConfigureError -> SmithConfigureError -> Bool # (<=) :: SmithConfigureError -> SmithConfigureError -> Bool # (>) :: SmithConfigureError -> SmithConfigureError -> Bool # (>=) :: SmithConfigureError -> SmithConfigureError -> Bool # max :: SmithConfigureError -> SmithConfigureError -> SmithConfigureError # min :: SmithConfigureError -> SmithConfigureError -> SmithConfigureError # | |
Show SmithConfigureError Source # | |
Defined in Smith.Client.Config showsPrec :: Int -> SmithConfigureError -> ShowS # show :: SmithConfigureError -> String # showList :: [SmithConfigureError] -> ShowS # |
Smith API definition runners.
runRequest :: Smith -> Request a -> IO (Either SmithError a) Source #
Takes Smith runtime data, and an API request definition and actually runs the request. Results are in IO and the error cases handled explicitly.
runRequestT :: Smith -> Request a -> ExceptT SmithError IO a Source #
Takes Smith runtime data, and an API request definition and actually runs the request. Results are embeded in ExceptT for convenience.
Smith API definitions.
module Smith.Client.Api