flowdock-0.1.0.0: Flowdock client library for Haskell

Safe HaskellNone

Chat.Flowdock

Contents

Description

A client library for the Flowdock API. Currently only implements the push API.

Synopsis

Using the client

The Flowdock API has different authentication mechanisms for different parts of the API. Functions that depend on specific authentication data are tagged with the authentication type necessary to use them.

 {-# LANGUAGE OverloadedStrings #-}

 import Chat.Flowdock
 
 -- The push API uses the 'Push' authentication type
 main = withFlowdockClient (Push "YOUR_FLOW_TOKEN_HERE") $ \client -> do
   let msg = newChatPushMessage "Hello World Bot" "Hello, world!"
   pushToChat client msg

withFlowdockClient :: auth -> (FlowdockClient auth -> IO a) -> IO aSource

Authentication types

newtype Push Source

Constructors

Push 

Pushing messages to the inbox

Pushing messages to the chatroom

Constructing messages

InboxPushMessage fields

source :: HasSource c e => Lens' c eSource

fromAddress :: HasFromAddress c e => Lens' c eSource

subject :: HasSubject c e => Lens' c eSource

fromName :: HasFromName c e => Lens' c eSource

replyTo :: HasReplyTo c e => Lens' c eSource

project :: HasProject c e => Lens' c eSource

format :: HasFormat c e => Lens' c eSource

link :: HasLink c e => Lens' c eSource

ChatPushMessage fields

externalUserName :: HasExternalUserName c e => Lens' c eSource

messageId :: HasMessageId c e => Lens' c eSource

Common fields

content :: HasContent c e => Lens' c eSource

data Tag Source

Constructors

UserTag Text 
HashTag Text 

Instances

tags :: HasTags c e => Lens' c eSource

Exception types