-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/
-- | Report events to FunBot over a JSON/HTTP API.
--
@package funbot-client
@version 0.1.0.1
-- | Using this module, you can send external events (such as git commits)
-- to a running FunBot instance over HTTP.
--
-- Constructing events requires using types from the
-- funbot-ext-events package. But you should not use the
-- ExtEvent constructors from there, because if they change, it
-- will break your code. Instead, use the functions provided below. This
-- way new events can be added without breaking old code.
module FunBot.Client
-- | Reference to running FunBot instance to which you can send events.
data Bot
-- | An event coming from one of the external event sources.
data ExtEvent :: *
-- | Create a reference to a FunBot instance.
--
-- You can parse the URL at runtime using parseURI or at compile
-- time using staticURI (or the uri quasi quoter in the
-- same package).
mkBot :: URI -> Bool -> Bot
-- | Send an event to a bot over HTTP. If successfully sent, return
-- Nothing. If an error occurs, return Just the error
-- details.
sendExtEvent :: Bot -> ExtEvent -> IO (Maybe ConnError)
-- | Construct a git push event.
mkPushEvent :: Push -> ExtEvent
-- | Construct a git tag event.
mkTagEvent :: Tag -> ExtEvent
-- | Construct a merge request event.
mkMergeRequestEvent :: MergeRequest -> ExtEvent
-- | Construct a news item event.
mkNewsEvent :: NewsItem -> ExtEvent
-- | Construct a paste event.
mkPasteEvent :: Paste -> ExtEvent