Safe Haskell | None |
---|

- method :: Monad n => Method -> ApiaryT c n m a -> ApiaryT c n m a
- data Method
- httpVersion :: Monad n => HttpVersion -> Html -> ApiaryT c n m b -> ApiaryT c n m b
- http09 :: Monad n => ApiaryT c n m b -> ApiaryT c n m b
- http10 :: Monad n => ApiaryT c n m b -> ApiaryT c n m b
- http11 :: Monad n => ApiaryT c n m b -> ApiaryT c n m b
- root :: (Functor m, Monad m, Monad n) => ApiaryT c n m b -> ApiaryT c n m b
- anyPath :: (Functor m, Monad m, Monad n) => ApiaryT c n m b -> ApiaryT c n m b
- capture :: QuasiQuoter
- path :: Monad n => Text -> ApiaryT c n m a -> ApiaryT c n m a
- endPath :: (Functor n, Monad n) => ApiaryT c n m a -> ApiaryT c n m a
- fetch :: (Path a, Functor n, Monad n) => proxy a -> Maybe Html -> ApiaryT (Snoc as a) n m b -> ApiaryT as n m b
- data QueryKey = QueryKey {
- queryKey :: ByteString
- queryDesc :: Maybe Html

- (??) :: QueryKey -> Html -> QueryKey
- query :: forall a as w n m b proxy. (ReqParam a, Strategy w, MonadIO n) => QueryKey -> proxy (w a) -> ApiaryT (SNext w as a) n m b -> ApiaryT as n m b
- (=:) :: (MonadIO n, ReqParam a) => QueryKey -> proxy a -> ApiaryT (Snoc as a) n m b -> ApiaryT as n m b
- (=!:) :: (MonadIO n, ReqParam a) => QueryKey -> proxy a -> ApiaryT (Snoc as a) n m b -> ApiaryT as n m b
- (=?:) :: (MonadIO n, ReqParam a) => QueryKey -> proxy a -> ApiaryT (Snoc as (Maybe a)) n m b -> ApiaryT as n m b
- (?:) :: (MonadIO n, ReqParam a) => QueryKey -> proxy a -> ApiaryT as n m b -> ApiaryT as n m b
- (=*:) :: (MonadIO n, ReqParam a) => QueryKey -> proxy a -> ApiaryT (Snoc as [a]) n m b -> ApiaryT as n m b
- (=+:) :: (MonadIO n, ReqParam a) => QueryKey -> proxy a -> ApiaryT (Snoc as [a]) n m b -> ApiaryT as n m b
- hasQuery :: MonadIO n => QueryKey -> ApiaryT c n m a -> ApiaryT c n m a
- hasHeader :: Monad n => HeaderName -> ApiaryT as n m b -> ApiaryT as n m b
- eqHeader :: Monad n => HeaderName -> ByteString -> ApiaryT as n m b -> ApiaryT as n m b
- headers :: Monad n => HeaderName -> ApiaryT (Snoc as [ByteString]) n m b -> ApiaryT as n m b
- header :: Monad n => HeaderName -> ApiaryT (Snoc as ByteString) n m b -> ApiaryT as n m b
- header' :: (Strategy w, Monad n) => (forall x. Proxy x -> Proxy (w x)) -> (Header -> Bool) -> Maybe Html -> ApiaryT (SNext w as ByteString) n m b -> ApiaryT as n m b
- ssl :: Monad n => ApiaryT c n m a -> ApiaryT c n m a
- stdMethod :: Monad n => Method -> ApiaryT c n m a -> ApiaryT c n m a

# filters

## http method

method :: Monad n => Method -> ApiaryT c n m a -> ApiaryT c n m aSource

filter by HTTP method. since 0.1.0.0.

method GET -- stdmethod method "HOGE" -- non standard method

## http version

httpVersion :: Monad n => HttpVersion -> Html -> ApiaryT c n m b -> ApiaryT c n m bSource

http version filter. since 0.5.0.0.

http09 :: Monad n => ApiaryT c n m b -> ApiaryT c n m bSource

http/0.9 only accepted fiter. since 0.5.0.0.

http10 :: Monad n => ApiaryT c n m b -> ApiaryT c n m bSource

http/1.0 only accepted fiter. since 0.5.0.0.

http11 :: Monad n => ApiaryT c n m b -> ApiaryT c n m bSource

http/1.1 only accepted fiter. since 0.5.0.0.

## path matcher

root :: (Functor m, Monad m, Monad n) => ApiaryT c n m b -> ApiaryT c n m bSource

filter by `rootPattern`

of `ApiaryConfig`

.

anyPath :: (Functor m, Monad m, Monad n) => ApiaryT c n m b -> ApiaryT c n m bSource

match all subsequent path. since 0.15.0.

path :: Monad n => Text -> ApiaryT c n m a -> ApiaryT c n m aSource

check first path and drill down. since 0.11.0.

endPath :: (Functor n, Monad n) => ApiaryT c n m a -> ApiaryT c n m aSource

check consumed paths. since 0.11.1.

fetch :: (Path a, Functor n, Monad n) => proxy a -> Maybe Html -> ApiaryT (Snoc as a) n m b -> ApiaryT as n m bSource

get first path and drill down. since 0.11.0.

## query matcher

query :: forall a as w n m b proxy. (ReqParam a, Strategy w, MonadIO n) => QueryKey -> proxy (w a) -> ApiaryT (SNext w as a) n m b -> ApiaryT as n m bSource

low level query getter. since 0.5.0.0.

query key (Proxy :: Proxy (fetcher type))

examples:

query key (Proxy :: Proxy (`First`

Int)) -- get first 'key' query parameter as Int. query key (Proxy :: Proxy (`Option`

(Maybe Int)) -- get first 'key' query parameter as Int. allow without param or value. query key (Proxy :: Proxy (`Many`

String) -- get all 'key' query parameter as String.

### specified operators

(=:) :: (MonadIO n, ReqParam a) => QueryKey -> proxy a -> ApiaryT (Snoc as a) n m b -> ApiaryT as n m bSource

(=!:) :: (MonadIO n, ReqParam a) => QueryKey -> proxy a -> ApiaryT (Snoc as a) n m b -> ApiaryT as n m bSource

(=?:) :: (MonadIO n, ReqParam a) => QueryKey -> proxy a -> ApiaryT (Snoc as (Maybe a)) n m b -> ApiaryT as n m bSource

(?:) :: (MonadIO n, ReqParam a) => QueryKey -> proxy a -> ApiaryT as n m b -> ApiaryT as n m bSource

(=*:) :: (MonadIO n, ReqParam a) => QueryKey -> proxy a -> ApiaryT (Snoc as [a]) n m b -> ApiaryT as n m bSource

(=+:) :: (MonadIO n, ReqParam a) => QueryKey -> proxy a -> ApiaryT (Snoc as [a]) n m b -> ApiaryT as n m bSource

## header matcher

hasHeader :: Monad n => HeaderName -> ApiaryT as n m b -> ApiaryT as n m bSource

check whether to exists specified header or not. since 0.6.0.0.

:: Monad n | |

=> HeaderName | |

-> ByteString | header value |

-> ApiaryT as n m b | |

-> ApiaryT as n m b |

check whether to exists specified valued header or not. since 0.6.0.0.

headers :: Monad n => HeaderName -> ApiaryT (Snoc as [ByteString]) n m b -> ApiaryT as n m bSource

filter by headers up to 100 entries. since 0.6.0.0.

header :: Monad n => HeaderName -> ApiaryT (Snoc as ByteString) n m b -> ApiaryT as n m bSource

filter by header and get first. since 0.6.0.0.

header' :: (Strategy w, Monad n) => (forall x. Proxy x -> Proxy (w x)) -> (Header -> Bool) -> Maybe Html -> ApiaryT (SNext w as ByteString) n m b -> ApiaryT as n m bSource

low level header filter. since 0.6.0.0.