slack-progressbar-0.1.0.1

Copyright(c) 2020 Tom McLaughlin
LicenseMIT
Stabilityexperimental
Portabilityportable
Safe HaskellNone
LanguageHaskell2010

Web.Slack.ProgressBar

Description

This is a simple library for creating and updating Slack messages that contain progress bars. It can be used to display the progress of a long-running task in a Slack channel, for example as part of CI tooling.

See app/Main.hs in the repo for example code, or README.md on GitHub for an animated GIF.

Synopsis

Documentation

createProgressBar :: SlackConfig -> ChannelName -> ProgressBarInfo -> IO (Either Text ProgressBar) Source #

Create a progress bar message on the given channel. Returns a ProgressBar which can be used to update the message by calling updateProgressBar.

updateProgressBar :: SlackConfig -> ProgressBar -> ProgressBarInfo -> IO (Either Text ()) Source #

Update an existing progress bar.

data ProgressBarInfo Source #

The state of a progress bar message.

Constructors

ProgressBarInfo 

Fields

data ProgressBar Source #

An opaque type representing an existing Slack message.

newtype SlackConfig Source #

Configuration options needed to connect to the Slack API

Constructors

SlackConfig 

Fields

Instances
Show SlackConfig Source # 
Instance details

Defined in Web.Slack.ProgressBar