| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
Calamity.HTTP.Internal.Types
Description
Types for the http lib
Documentation
Constructors
| HTTPError | An error response from discord |
| InternalClientError Text | Something failed while making the request (after retrying a few times) |
data RateLimitState Source #
Constructors
| RateLimitState | |
Fields
| |
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 Methods 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 Methods 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 Methods labelOptic :: Optic k NoIx RateLimitState RateLimitState a b # | |
data DiscordResponseType Source #
Constructors
| Good | A good response |
Fields
| |
| Ratelimited | We hit a 429, no response and ratelimited |
Fields
| |
| 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 |
Constructors
| Bucket | |
Fields
| |
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 #
Constructors
| BucketState | |
Fields
| |
Instances
data GatewayResponse Source #
Instances
| FromJSON GatewayResponse Source # | |
Defined in Calamity.HTTP.Internal.Types Methods parseJSON :: Value -> Parser GatewayResponse # parseJSONList :: Value -> Parser [GatewayResponse] # | |
| Show GatewayResponse Source # | |
Defined in Calamity.HTTP.Internal.Types Methods 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 Methods labelOptic :: Optic k NoIx GatewayResponse GatewayResponse a b # | |
data BotGatewayResponse Source #
Instances
| FromJSON BotGatewayResponse Source # | |
Defined in Calamity.HTTP.Internal.Types Methods parseJSON :: Value -> Parser BotGatewayResponse # parseJSONList :: Value -> Parser [BotGatewayResponse] # | |
| Show BotGatewayResponse Source # | |
Defined in Calamity.HTTP.Internal.Types Methods 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 Methods 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 Methods labelOptic :: Optic k NoIx BotGatewayResponse BotGatewayResponse a b # | |