Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Combined http request stuff
Synopsis
- invoke :: (Members '[RatelimitEff, TokenEff, LogEff, MetricEff, Embed IO] r, Request a, ReadResponse (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.Interaction
- module Calamity.HTTP.MiscRoutes
- module Calamity.HTTP.User
- module Calamity.HTTP.Reason
- module Calamity.HTTP.Webhook
- data RestError
- data RatelimitEff m a where
- data TokenEff m a where
- GetBotToken :: TokenEff m Token
Documentation
invoke :: (Members '[RatelimitEff, TokenEff, LogEff, MetricEff, Embed IO] r, Request a, ReadResponse (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.Interaction
module Calamity.HTTP.MiscRoutes
module Calamity.HTTP.User
module Calamity.HTTP.Reason
module Calamity.HTTP.Webhook
data RatelimitEff m a where Source #
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