GitHub - owainlewis/slack: Slack Web and RTM API
Skip to content

owainlewis/slack

Repository files navigation

SLACK

Haskell client for the Slack web api

CircleCI

Roadmap

  • Web API
  • Websocket API
  • Stackage Release
  • CI

API Use

All the web API methods are available but you may need to reference the slack docks for parameters.

For a full list of available methods and params visit https://api.slack.com/methods

Quick Start

import qualified Network.Slack.Api as Slack

token :: String
token = "XXX"

-- List channels
--
channels :: IO SlackResponse
channels = Slack.channelsList token []

-- Create a message in the random chat room
--
createMsgExample :: IO SlackResponse
createMsgExample = Slack.chatPostMessage token [("channel", "#random"), ("text", "Hi from Haskell")]

Get information about a request endpoint

λ> info "channels.list"
"Lists all channels in a Slack team"