example

command
v0.2.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 9, 2019 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Example is a small demonstration of slackio's capabilities.

It has two modes.

Without a channel ID, it will connect to Slack and print (to standard output) all messages from all channels that the user is currently a member of.

With a channel ID, it will connect to Slack and print (to standard output) all messages from a single channel. Additionally, lines read from standard input are sent back to the channel as messages.

Note that the channel ID is a 9-character identifier, and is not the same as the human-readable channel name in the Slack UI. When viewing Slack in a browser, the ID of the selected channel will appear at the end of the URL path.

Usage:

SLACK_TOKEN=xoxb-token go run example/main.go [channel]

The SLACK_TOKEN environment variable must be a valid Slack API token. Otherwise, example will panic.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL