Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
The route type Why I did this I don't know
Synopsis
- mkRouteBuilder :: RouteBuilder '[]
- giveID :: forall t reqs. Typeable t => Snowflake t -> RouteBuilder reqs -> RouteBuilder ('('IDRequirement t, 'Satisfied) ': reqs)
- giveParam :: forall (s :: Symbol) reqs. KnownSymbol s => Text -> RouteBuilder reqs -> RouteBuilder ('('PSRequirement s, 'Satisfied) ': reqs)
- buildRoute :: forall (reqs :: [(RequirementType, RouteRequirement)]). EnsureFulfilled reqs => RouteBuilder reqs -> Route
- routeKey :: Route -> RouteKey
- type RouteKey = (Text, Maybe (Snowflake Channel), Maybe (Snowflake Guild))
- data RouteBuilder (reqstate :: [(RequirementType, RouteRequirement)])
- data RouteRequirement
- data Route
- newtype S = S Text
- data PS (s :: Symbol) = PS
- data ID a = ID
- class Typeable a => RouteFragmentable a reqs where
- type ConsRes a reqs
- (//) :: RouteBuilder reqs -> a -> ConsRes a reqs
Documentation
mkRouteBuilder :: RouteBuilder '[] Source #
giveID :: forall t reqs. Typeable t => Snowflake t -> RouteBuilder reqs -> RouteBuilder ('('IDRequirement t, 'Satisfied) ': reqs) Source #
giveParam :: forall (s :: Symbol) reqs. KnownSymbol s => Text -> RouteBuilder reqs -> RouteBuilder ('('PSRequirement s, 'Satisfied) ': reqs) Source #
buildRoute :: forall (reqs :: [(RequirementType, RouteRequirement)]). EnsureFulfilled reqs => RouteBuilder reqs -> Route Source #
data RouteBuilder (reqstate :: [(RequirementType, RouteRequirement)]) Source #
data RouteRequirement Source #
Instances
Show RouteRequirement Source # | |
Defined in Calamity.HTTP.Internal.Route showsPrec :: Int -> RouteRequirement -> ShowS # show :: RouteRequirement -> String # showList :: [RouteRequirement] -> ShowS # | |
Eq RouteRequirement Source # | |
Defined in Calamity.HTTP.Internal.Route (==) :: RouteRequirement -> RouteRequirement -> Bool # (/=) :: RouteRequirement -> RouteRequirement -> Bool # |
Instances
Show Route Source # | |
(k ~ A_Lens, a ~ Maybe (Snowflake Channel), b ~ Maybe (Snowflake Channel)) => LabelOptic "channelID" k Route Route a b Source # | |
Defined in Calamity.HTTP.Internal.Route | |
(k ~ A_Lens, a ~ Maybe (Snowflake Guild), b ~ Maybe (Snowflake Guild)) => LabelOptic "guildID" k Route Route a b Source # | |
Defined in Calamity.HTTP.Internal.Route | |
(k ~ A_Lens, a ~ Text, b ~ Text) => LabelOptic "key" k Route Route a b Source # | |
Defined in Calamity.HTTP.Internal.Route | |
(k ~ A_Lens, a ~ Url 'Https, b ~ Url 'Https) => LabelOptic "path" k Route Route a b Source # | |
Defined in Calamity.HTTP.Internal.Route |
A static string fragment of a route
Instances
RouteFragmentable S reqs Source # | |
type ConsRes S reqs Source # | |
Defined in Calamity.HTTP.Internal.Route |
data PS (s :: Symbol) Source #
A parameterised string fragment of a route
Instances
KnownSymbol s => RouteFragmentable (PS s) reqs Source # | |
type ConsRes (PS s) reqs Source # | |
Defined in Calamity.HTTP.Internal.Route |
An id fragment of a route
Instances
class Typeable a => RouteFragmentable a reqs where Source #
(//) :: RouteBuilder reqs -> a -> ConsRes a reqs infixl 5 Source #
Instances
RouteFragmentable S reqs Source # | |
KnownSymbol s => RouteFragmentable (PS s) reqs Source # | |
Typeable a => RouteFragmentable (ID a) reqs Source # | |