hzulip-1.1.1.3: A haskell wrapper for the Zulip API.

Safe HaskellNone

Web.HZulip.Types

Synopsis

Documentation

type ZulipM = ReaderT ZulipOptions IO

The Monad in which Zulip API actions happen in. This is a ReaderT alias, so it's also a instance of MonadTrans, MonadIO etc.

data ZulipOptions

Represents a Zulip API client

Instances

data Response

The internal response representation for top-down parsing of Zulip API JSON responses

Instances

data ResponseResult

Represnts a response result, this is just so result Strings aren't modeled in memory

data Event

Represents zulip events

Constructors

Event 

Instances

Eq Event 
Ord Event 
Show Event 
FromJSON Event 

data User

Represents a zulip user account - for both display_recipient and message_sender representations

Instances

Eq User 
Ord User 
Show User 
FromJSON User 

data Queue

Represents some event queue

Constructors

Queue 

Fields

queueId :: String
 
lastEventId :: Int
 

Instances

type EventCallback = Event -> ZulipM ()

The root type for Event callbacks

type MessageCallback = Message -> ZulipM ()

Type for message callbacks

parseDisplayRecipient :: Value -> Parser (Either String [User])