hipbot-0.5: A library for building HipChat Bots

Safe HaskellNone
LanguageHaskell98

HipBot.Webhooks

Synopsis

Documentation

class HasMembers s a | s -> a where Source

Methods

members :: Lens' s a Source

class HasSelf s a | s -> a where Source

Methods

self :: Lens' s a Source

class HasWebhooks s a | s -> a where Source

Methods

webhooks :: Lens' s a Source

class HasRoomId s a | s -> a where Source

Methods

roomId :: Lens' s a Source

class HasName s a | s -> a where Source

Methods

name :: Lens' s a Source

class HasLinks s a | s -> a where Source

Methods

links :: Lens' s a Source

class HasWebhookId s a | s -> a where Source

Methods

webhookId :: Lens' s a Source

class HasOauthId s a | s -> a where Source

Methods

oauthId :: Lens' s a Source

class HasItem s a | s -> a where Source

Methods

item :: Lens' s a Source

webhookResource Source

Arguments

:: (MonadIO m, MonadReader r m, HasRequest r Request, MonadState s m, HasReqData s) 
=> String

webhook name

-> (WebhookRoomEvent -> HaltT m (Maybe Notification))

event processor

-> Resource m 

simpleWebhookResource Source

Arguments

:: MonadIO m 
=> String

webhook name

-> [Text]

command aliases, they will be removed before calling the processing function

-> (Text -> Maybe Text)

processing function, the result will become a room notification

-> WaiResource m 

Creates a simple "command" processing webhook resource. Commands processes are limited to pure functions that may or may not produce a reply.