erroneousboat-slack-term/vendor/github.com/slack-go/slack
2020-03-28 08:46:26 +01:00
..
internal Update nlopes/slack to slack-go/slack 2020-03-28 08:46:26 +01:00
slackutilsx Update nlopes/slack to slack-go/slack 2020-03-28 08:46:26 +01:00
.gitignore Update nlopes/slack to slack-go/slack 2020-03-28 08:46:26 +01:00
.gometalinter.json Update nlopes/slack to slack-go/slack 2020-03-28 08:46:26 +01:00
.travis.yml Update nlopes/slack to slack-go/slack 2020-03-28 08:46:26 +01:00
admin.go Update nlopes/slack to slack-go/slack 2020-03-28 08:46:26 +01:00
attachments.go Update nlopes/slack to slack-go/slack 2020-03-28 08:46:26 +01:00
auth.go Update nlopes/slack to slack-go/slack 2020-03-28 08:46:26 +01:00
backoff.go Update nlopes/slack to slack-go/slack 2020-03-28 08:46:26 +01:00
block_action.go Update nlopes/slack to slack-go/slack 2020-03-28 08:46:26 +01:00
block_context.go Update nlopes/slack to slack-go/slack 2020-03-28 08:46:26 +01:00
block_conv.go Update nlopes/slack to slack-go/slack 2020-03-28 08:46:26 +01:00
block_divider.go Update nlopes/slack to slack-go/slack 2020-03-28 08:46:26 +01:00
block_element.go Update nlopes/slack to slack-go/slack 2020-03-28 08:46:26 +01:00
block_file.go Update nlopes/slack to slack-go/slack 2020-03-28 08:46:26 +01:00
block_image.go Update nlopes/slack to slack-go/slack 2020-03-28 08:46:26 +01:00
block_input.go Update nlopes/slack to slack-go/slack 2020-03-28 08:46:26 +01:00
block_object.go Update nlopes/slack to slack-go/slack 2020-03-28 08:46:26 +01:00
block_section.go Update nlopes/slack to slack-go/slack 2020-03-28 08:46:26 +01:00
block_unknown.go Update nlopes/slack to slack-go/slack 2020-03-28 08:46:26 +01:00
block.go Update nlopes/slack to slack-go/slack 2020-03-28 08:46:26 +01:00
bots.go Update nlopes/slack to slack-go/slack 2020-03-28 08:46:26 +01:00
CHANGELOG.md Update nlopes/slack to slack-go/slack 2020-03-28 08:46:26 +01:00
channels.go Update nlopes/slack to slack-go/slack 2020-03-28 08:46:26 +01:00
chat.go Update nlopes/slack to slack-go/slack 2020-03-28 08:46:26 +01:00
comment.go Update nlopes/slack to slack-go/slack 2020-03-28 08:46:26 +01:00
conversation.go Update nlopes/slack to slack-go/slack 2020-03-28 08:46:26 +01:00
dialog_select.go Update nlopes/slack to slack-go/slack 2020-03-28 08:46:26 +01:00
dialog_text.go Update nlopes/slack to slack-go/slack 2020-03-28 08:46:26 +01:00
dialog.go Update nlopes/slack to slack-go/slack 2020-03-28 08:46:26 +01:00
dnd.go Update nlopes/slack to slack-go/slack 2020-03-28 08:46:26 +01:00
emoji.go Update nlopes/slack to slack-go/slack 2020-03-28 08:46:26 +01:00
errors.go Update nlopes/slack to slack-go/slack 2020-03-28 08:46:26 +01:00
files.go Update nlopes/slack to slack-go/slack 2020-03-28 08:46:26 +01:00
go.mod Update nlopes/slack to slack-go/slack 2020-03-28 08:46:26 +01:00
go.sum Update nlopes/slack to slack-go/slack 2020-03-28 08:46:26 +01:00
groups.go Update nlopes/slack to slack-go/slack 2020-03-28 08:46:26 +01:00
history.go Update nlopes/slack to slack-go/slack 2020-03-28 08:46:26 +01:00
im.go Update nlopes/slack to slack-go/slack 2020-03-28 08:46:26 +01:00
info.go Update nlopes/slack to slack-go/slack 2020-03-28 08:46:26 +01:00
interactions.go Update nlopes/slack to slack-go/slack 2020-03-28 08:46:26 +01:00
item.go Update nlopes/slack to slack-go/slack 2020-03-28 08:46:26 +01:00
LICENSE Update nlopes/slack to slack-go/slack 2020-03-28 08:46:26 +01:00
logger.go Update nlopes/slack to slack-go/slack 2020-03-28 08:46:26 +01:00
Makefile Update nlopes/slack to slack-go/slack 2020-03-28 08:46:26 +01:00
messageID.go Update nlopes/slack to slack-go/slack 2020-03-28 08:46:26 +01:00
messages.go Update nlopes/slack to slack-go/slack 2020-03-28 08:46:26 +01:00
misc.go Update nlopes/slack to slack-go/slack 2020-03-28 08:46:26 +01:00
oauth.go Update nlopes/slack to slack-go/slack 2020-03-28 08:46:26 +01:00
pagination.go Update nlopes/slack to slack-go/slack 2020-03-28 08:46:26 +01:00
pins.go Update nlopes/slack to slack-go/slack 2020-03-28 08:46:26 +01:00
reactions.go Update nlopes/slack to slack-go/slack 2020-03-28 08:46:26 +01:00
README.md Update nlopes/slack to slack-go/slack 2020-03-28 08:46:26 +01:00
reminders.go Update nlopes/slack to slack-go/slack 2020-03-28 08:46:26 +01:00
rtm.go Update nlopes/slack to slack-go/slack 2020-03-28 08:46:26 +01:00
search.go Update nlopes/slack to slack-go/slack 2020-03-28 08:46:26 +01:00
security.go Update nlopes/slack to slack-go/slack 2020-03-28 08:46:26 +01:00
slack.go Update nlopes/slack to slack-go/slack 2020-03-28 08:46:26 +01:00
slash.go Update nlopes/slack to slack-go/slack 2020-03-28 08:46:26 +01:00
stars.go Update nlopes/slack to slack-go/slack 2020-03-28 08:46:26 +01:00
team.go Update nlopes/slack to slack-go/slack 2020-03-28 08:46:26 +01:00
TODO.txt Update nlopes/slack to slack-go/slack 2020-03-28 08:46:26 +01:00
usergroups.go Update nlopes/slack to slack-go/slack 2020-03-28 08:46:26 +01:00
users.go Update nlopes/slack to slack-go/slack 2020-03-28 08:46:26 +01:00
views.go Update nlopes/slack to slack-go/slack 2020-03-28 08:46:26 +01:00
webhooks_go112.go Update nlopes/slack to slack-go/slack 2020-03-28 08:46:26 +01:00
webhooks_go113.go Update nlopes/slack to slack-go/slack 2020-03-28 08:46:26 +01:00
webhooks.go Update nlopes/slack to slack-go/slack 2020-03-28 08:46:26 +01:00
websocket_channels.go Update nlopes/slack to slack-go/slack 2020-03-28 08:46:26 +01:00
websocket_desktop_notification.go Update nlopes/slack to slack-go/slack 2020-03-28 08:46:26 +01:00
websocket_dm.go Update nlopes/slack to slack-go/slack 2020-03-28 08:46:26 +01:00
websocket_dnd.go Update nlopes/slack to slack-go/slack 2020-03-28 08:46:26 +01:00
websocket_files.go Update nlopes/slack to slack-go/slack 2020-03-28 08:46:26 +01:00
websocket_groups.go Update nlopes/slack to slack-go/slack 2020-03-28 08:46:26 +01:00
websocket_internals.go Update nlopes/slack to slack-go/slack 2020-03-28 08:46:26 +01:00
websocket_managed_conn.go Update nlopes/slack to slack-go/slack 2020-03-28 08:46:26 +01:00
websocket_misc.go Update nlopes/slack to slack-go/slack 2020-03-28 08:46:26 +01:00
websocket_mobile_in_app_notification.go Update nlopes/slack to slack-go/slack 2020-03-28 08:46:26 +01:00
websocket_pins.go Update nlopes/slack to slack-go/slack 2020-03-28 08:46:26 +01:00
websocket_reactions.go Update nlopes/slack to slack-go/slack 2020-03-28 08:46:26 +01:00
websocket_stars.go Update nlopes/slack to slack-go/slack 2020-03-28 08:46:26 +01:00
websocket_subteam.go Update nlopes/slack to slack-go/slack 2020-03-28 08:46:26 +01:00
websocket_teams.go Update nlopes/slack to slack-go/slack 2020-03-28 08:46:26 +01:00
websocket.go Update nlopes/slack to slack-go/slack 2020-03-28 08:46:26 +01:00

Slack API in Go GoDoc Build Status

This is the original Slack library for Go created by Norberto Lopez, transferred to a Github organization.

Join the chat at https://gitter.im/go-slack/Lobby

This library supports most if not all of the api.slack.com REST calls, as well as the Real-Time Messaging protocol over websocket, in a fully managed way.

Changelog

CHANGELOG.md is available. Please visit it for updates.

Installing

go get

$ go get -u github.com/slack-go/slack

Example

Getting all groups

import (
	"fmt"

	"github.com/slack-go/slack"
)

func main() {
	api := slack.New("YOUR_TOKEN_HERE")
	// If you set debugging, it will log all requests to the console
	// Useful when encountering issues
	// slack.New("YOUR_TOKEN_HERE", slack.OptionDebug(true))
	groups, err := api.GetGroups(false)
	if err != nil {
		fmt.Printf("%s\n", err)
		return
	}
	for _, group := range groups {
		fmt.Printf("ID: %s, Name: %s\n", group.ID, group.Name)
	}
}

Getting User Information

import (
    "fmt"

    "github.com/slack-go/slack"
)

func main() {
    api := slack.New("YOUR_TOKEN_HERE")
    user, err := api.GetUserInfo("U023BECGF")
    if err != nil {
	    fmt.Printf("%s\n", err)
	    return
    }
    fmt.Printf("ID: %s, Fullname: %s, Email: %s\n", user.ID, user.Profile.RealName, user.Profile.Email)
}

Minimal RTM usage:

See https://github.com/slack-go/slack/blob/master/examples/websocket/websocket.go

Minimal EventsAPI usage:

See https://github.com/slack-go/slack/blob/master/examples/eventsapi/events.go

Contributing

You are more than welcome to contribute to this project. Fork and make a Pull Request, or create an Issue if you see any problem.

Before making any Pull Request please run the following:

make pr-prep

This will check/update code formatting, linting and then run all tests

License

BSD 2 Clause license