Safe Haskell | None |
---|
- type ZulipM = ReaderT ZulipOptions IO
- data ZulipOptions = ZulipOptions {
- clientEmail :: String
- clientApiKey :: String
- clientBaseUrl :: String
- clientManager :: Manager
- data Response = Response {}
- data ResponseResult
- data Event = Event {}
- data Message = Message {
- messageId :: Int
- messageType :: String
- messageContent :: String
- messageAvatarUrl :: String
- messageTimestamp :: Int
- messageDisplayRecipient :: Either String [User]
- messageSender :: User
- messageGravatarHash :: String
- messageRecipientId :: Int
- messageClient :: String
- messageSubjectLinks :: [String]
- messageSubject :: String
- data User = User {
- userId :: Int
- userFullName :: String
- userEmail :: String
- userDomain :: String
- userShortName :: String
- data Queue = Queue {
- queueId :: String
- lastEventId :: Int
- type EventCallback = Event -> ZulipM ()
- type MessageCallback = Message -> ZulipM ()
- parseDisplayRecipient :: Value -> Parser (Either String [User])
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
ZulipOptions | |
|
data Response
The internal response representation for top-down parsing of Zulip API JSON responses
data ResponseResult
Represnts a response result, this is just so result Strings aren't modeled in memory
data Event
Represents zulip events
data Message
Represents a Zulip Message
Message | |
|
data User
Represents a zulip user account - for both display_recipient
and
message_sender
representations
User | |
|
type EventCallback = Event -> ZulipM ()
The root type for Event callbacks
type MessageCallback = Message -> ZulipM ()
Type for message callbacks
parseDisplayRecipient :: Value -> Parser (Either String [User])