discord-types-0.2.2: Type information for discord-hs

Safe HaskellNone
LanguageHaskell2010

Network.Discord.Types

Description

Provides types and encoding/decoding code. Types should be identical to those provided in the Discord API documentation.

Synopsis

Documentation

data Auth Source #

Authorization token for the Discord API

Instances

Show Auth Source #

Formats the token for use with the REST API

Methods

showsPrec :: Int -> Auth -> ShowS #

show :: Auth -> String #

showList :: [Auth] -> ShowS #

authToken :: Auth -> String Source #

Get the raw token formatted for use with the websocket gateway

newtype Snowflake Source #

A unique integer identifier. Can be used to calculate the creation date of an entity.

Constructors

Snowflake Word64 

Instances

Enum Snowflake Source # 
Eq Snowflake Source # 
Integral Snowflake Source # 
Num Snowflake Source # 
Ord Snowflake Source # 
Real Snowflake Source # 
Show Snowflake Source # 
Hashable Snowflake Source # 
ToJSON Snowflake Source # 
FromJSON Snowflake Source # 
Bits Snowflake Source # 

creationDate :: Snowflake -> UTCTime Source #

Gets a creation date from a snowflake.

epochTime :: UTCTime Source #

Default timestamp

justRight :: Show a => Either a b -> b Source #

Return only the Right vaule from an either

reparse :: (ToJSON a, FromJSON b) => a -> Either String b Source #

Convert ToJSON values to FromJSON values

module Data.Aeson