Safe Haskell | None |
---|---|
Language | Haskell2010 |
Combined http request stuff
Synopsis
- invoke :: (BotC r, Request a, FromJSON (Result a)) => a -> Sem r (Either RestError (Result a))
- module Calamity.HTTP.AuditLog
- module Calamity.HTTP.Channel
- module Calamity.HTTP.Emoji
- module Calamity.HTTP.Guild
- module Calamity.HTTP.Invite
- module Calamity.HTTP.MiscRoutes
- module Calamity.HTTP.User
- module Calamity.HTTP.Reason
- data RestError
- module Calamity.HTTP.Webhook
Documentation
invoke :: (BotC r, Request a, FromJSON (Result a)) => a -> Sem r (Either RestError (Result a)) Source #
module Calamity.HTTP.AuditLog
module Calamity.HTTP.Channel
module Calamity.HTTP.Emoji
module Calamity.HTTP.Guild
module Calamity.HTTP.Invite
module Calamity.HTTP.MiscRoutes
module Calamity.HTTP.User
module Calamity.HTTP.Reason
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.1.26.0-8Rbyh2JfYBvC9UHgZLNZiA" '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))) |
module Calamity.HTTP.Webhook
HTTP
This module contains all the http related things
Registered Metrics
Gauge:
"inflight_requests" [route]
Keeps track of how many requests are currently in-flight, the
route
parameter will be the route that is currently active.
Counter:
"total_requests" [route]
Incremented on every request, the
route
parameter is the route that the request was made on.
Examples
Editing a message:
invoke
$EditMessage
someChannel someMessage (Just
"new content")Nothing