Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Types for the http lib
Documentation
HTTPError | An error response from discord |
InternalClientError Text | Something failed while making the request (after retrying a few times) |
data RateLimitState Source #
RateLimitState | |
|
Instances
(k ~ A_Lens, a ~ Map RouteKey ByteString, b ~ Map RouteKey ByteString) => LabelOptic "bucketKeys" k RateLimitState RateLimitState a b Source # | |
Defined in Calamity.HTTP.Internal.Types labelOptic :: Optic k NoIx RateLimitState RateLimitState a b # | |
(k ~ A_Lens, a ~ Map ByteString Bucket, b ~ Map ByteString Bucket) => LabelOptic "buckets" k RateLimitState RateLimitState a b Source # | |
Defined in Calamity.HTTP.Internal.Types labelOptic :: Optic k NoIx RateLimitState RateLimitState a b # | |
(k ~ A_Lens, a ~ Event, b ~ Event) => LabelOptic "globalLock" k RateLimitState RateLimitState a b Source # | |
Defined in Calamity.HTTP.Internal.Types labelOptic :: Optic k NoIx RateLimitState RateLimitState a b # |
data DiscordResponseType Source #
Good | A good response |
| |
Ratelimited | We hit a 429, no response and ratelimited |
| |
ServerError Int | Discord's error, we should retry (HTTP 5XX) |
ClientError Int ByteString | Our error, we should fail |
InternalResponseError Text | Something went wrong with the http client |
Instances
(k ~ An_Iso, a ~ TVar BucketState, b ~ TVar BucketState) => LabelOptic "state" k Bucket Bucket a b Source # | |
Defined in Calamity.HTTP.Internal.Types |
data BucketState Source #
BucketState | |
|
Instances
data GatewayResponse Source #
Instances
FromJSON GatewayResponse Source # | |
Defined in Calamity.HTTP.Internal.Types parseJSON :: Value -> Parser GatewayResponse # parseJSONList :: Value -> Parser [GatewayResponse] # | |
Show GatewayResponse Source # | |
Defined in Calamity.HTTP.Internal.Types showsPrec :: Int -> GatewayResponse -> ShowS # show :: GatewayResponse -> String # showList :: [GatewayResponse] -> ShowS # | |
(k ~ An_Iso, a ~ Text, b ~ Text) => LabelOptic "url" k GatewayResponse GatewayResponse a b Source # | |
Defined in Calamity.HTTP.Internal.Types labelOptic :: Optic k NoIx GatewayResponse GatewayResponse a b # |
data BotGatewayResponse Source #
Instances
FromJSON BotGatewayResponse Source # | |
Defined in Calamity.HTTP.Internal.Types parseJSON :: Value -> Parser BotGatewayResponse # parseJSONList :: Value -> Parser [BotGatewayResponse] # | |
Show BotGatewayResponse Source # | |
Defined in Calamity.HTTP.Internal.Types showsPrec :: Int -> BotGatewayResponse -> ShowS # show :: BotGatewayResponse -> String # showList :: [BotGatewayResponse] -> ShowS # | |
(k ~ A_Lens, a ~ Int, b ~ Int) => LabelOptic "shards" k BotGatewayResponse BotGatewayResponse a b Source # | |
Defined in Calamity.HTTP.Internal.Types labelOptic :: Optic k NoIx BotGatewayResponse BotGatewayResponse a b # | |
(k ~ A_Lens, a ~ Text, b ~ Text) => LabelOptic "url" k BotGatewayResponse BotGatewayResponse a b Source # | |
Defined in Calamity.HTTP.Internal.Types labelOptic :: Optic k NoIx BotGatewayResponse BotGatewayResponse a b # |