Safe Haskell | None |
---|---|
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) |
Instances
Show RestError Source # | |
Generic RestError Source # | |
type Rep RestError Source # | |
Defined in Calamity.HTTP.Internal.Types type Rep RestError = D1 ('MetaData "RestError" "Calamity.HTTP.Internal.Types" "calamity-0.3.0.0-inplace" 'False) (C1 ('MetaCons "HTTPError" 'PrefixI 'True) (S1 ('MetaSel ('Just "status") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int) :*: S1 ('MetaSel ('Just "response") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Value))) :+: C1 ('MetaCons "InternalClientError" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text))) |
data RateLimitState Source #
RateLimitState | |
|
Instances
Generic RateLimitState Source # | |
Defined in Calamity.HTTP.Internal.Types type Rep RateLimitState :: Type -> Type # from :: RateLimitState -> Rep RateLimitState x # to :: Rep RateLimitState x -> RateLimitState # | |
type Rep RateLimitState Source # | |
Defined in Calamity.HTTP.Internal.Types type Rep RateLimitState = D1 ('MetaData "RateLimitState" "Calamity.HTTP.Internal.Types" "calamity-0.3.0.0-inplace" 'False) (C1 ('MetaCons "RateLimitState" 'PrefixI 'True) (S1 ('MetaSel ('Just "bucketKeys") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Map RouteKey ByteString)) :*: (S1 ('MetaSel ('Just "buckets") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Map ByteString Bucket)) :*: S1 ('MetaSel ('Just "globalLock") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Event)))) |
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
Generic Bucket Source # | |
type Rep Bucket Source # | |
Defined in Calamity.HTTP.Internal.Types type Rep Bucket = D1 ('MetaData "Bucket" "Calamity.HTTP.Internal.Types" "calamity-0.3.0.0-inplace" 'True) (C1 ('MetaCons "Bucket" 'PrefixI 'True) (S1 ('MetaSel ('Just "state") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (TVar BucketState)))) |
data BucketState Source #
BucketState | |
|
Instances
data GatewayResponse Source #
Instances
Show GatewayResponse Source # | |
Defined in Calamity.HTTP.Internal.Types showsPrec :: Int -> GatewayResponse -> ShowS # show :: GatewayResponse -> String # showList :: [GatewayResponse] -> ShowS # | |
Generic GatewayResponse Source # | |
Defined in Calamity.HTTP.Internal.Types type Rep GatewayResponse :: Type -> Type # from :: GatewayResponse -> Rep GatewayResponse x # to :: Rep GatewayResponse x -> GatewayResponse # | |
FromJSON GatewayResponse Source # | |
Defined in Calamity.HTTP.Internal.Types parseJSON :: Value -> Parser GatewayResponse # parseJSONList :: Value -> Parser [GatewayResponse] # | |
type Rep GatewayResponse Source # | |
Defined in Calamity.HTTP.Internal.Types type Rep GatewayResponse = D1 ('MetaData "GatewayResponse" "Calamity.HTTP.Internal.Types" "calamity-0.3.0.0-inplace" 'True) (C1 ('MetaCons "GatewayResponse" 'PrefixI 'True) (S1 ('MetaSel ('Just "url") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text))) |
data BotGatewayResponse Source #