discord-haskell-0.8.0: Write bots for Discord in Haskell

Safe HaskellNone
LanguageHaskell2010

Discord.Rest.Prelude

Description

Utility and base types and functions for the Discord Rest API

Synopsis

Documentation

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

newtype RestIO a Source #

Same Monad as IO. Overwrite Req settings

Constructors

RestIO 

Fields

Instances
Monad RestIO Source # 
Instance details

Defined in Discord.Rest.Prelude

Methods

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

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

return :: a -> RestIO a #

fail :: String -> RestIO a #

Functor RestIO Source # 
Instance details

Defined in Discord.Rest.Prelude

Methods

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

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

Applicative RestIO Source # 
Instance details

Defined in Discord.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.Rest.Prelude

Methods

liftIO :: IO a -> RestIO a #

MonadHttp RestIO Source # 
Instance details

Defined in Discord.Rest.Prelude