discord-haskell-1.9.1: Write bots for Discord in Haskell
Safe HaskellNone
LanguageHaskell2010

Discord.Internal.Rest.Prelude

Description

Utility and base types and functions for the Discord Rest API

Synopsis

Documentation

baseUrl :: Url 'Https Source #

The base url (Req) for API requests

authHeader :: Auth -> Option 'Https Source #

Discord requires HTTP headers for authentication.

(//) :: Show a => Url scheme -> a -> Url scheme infixl 5 Source #

data JsonRequest where Source #

Represtents a HTTP request made to an API that supplies a Json response

class Request a where Source #

newtype RestIO a Source #

Same Monad as IO. Overwrite Req settings

Constructors

RestIO 

Fields

Instances

Instances details
Monad RestIO Source # 
Instance details

Defined in Discord.Internal.Rest.Prelude

Methods

(>>=) :: RestIO a -> (a -> RestIO b) -> RestIO b #

(>>) :: RestIO a -> RestIO b -> RestIO b #

return :: a -> RestIO a #

Functor RestIO Source # 
Instance details

Defined in Discord.Internal.Rest.Prelude

Methods

fmap :: (a -> b) -> RestIO a -> RestIO b #

(<$) :: a -> RestIO b -> RestIO a #

Applicative RestIO Source # 
Instance details

Defined in Discord.Internal.Rest.Prelude

Methods

pure :: a -> RestIO a #

(<*>) :: RestIO (a -> b) -> RestIO a -> RestIO b #

liftA2 :: (a -> b -> c) -> RestIO a -> RestIO b -> RestIO c #

(*>) :: RestIO a -> RestIO b -> RestIO b #

(<*) :: RestIO a -> RestIO b -> RestIO a #

MonadIO RestIO Source # 
Instance details

Defined in Discord.Internal.Rest.Prelude

Methods

liftIO :: IO a -> RestIO a #

MonadHttp RestIO Source # 
Instance details

Defined in Discord.Internal.Rest.Prelude