You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
matterbridge/vendor/github.com/slack-go/slack
Wim 250b3bb579
Use upstream slack-go/slack again (#1018)
4 years ago
..
internal Use upstream slack-go/slack again (#1018) 4 years ago
slackutilsx Use upstream slack-go/slack again (#1018) 4 years ago
.gitignore Use upstream slack-go/slack again (#1018) 4 years ago
.gometalinter.json Use upstream slack-go/slack again (#1018) 4 years ago
.travis.yml Use upstream slack-go/slack again (#1018) 4 years ago
CHANGELOG.md Use upstream slack-go/slack again (#1018) 4 years ago
LICENSE Use upstream slack-go/slack again (#1018) 4 years ago
Makefile Use upstream slack-go/slack again (#1018) 4 years ago
README.md Use upstream slack-go/slack again (#1018) 4 years ago
TODO.txt Use upstream slack-go/slack again (#1018) 4 years ago
admin.go Use upstream slack-go/slack again (#1018) 4 years ago
attachments.go Use upstream slack-go/slack again (#1018) 4 years ago
auth.go Use upstream slack-go/slack again (#1018) 4 years ago
backoff.go Use upstream slack-go/slack again (#1018) 4 years ago
block.go Use upstream slack-go/slack again (#1018) 4 years ago
block_action.go Use upstream slack-go/slack again (#1018) 4 years ago
block_context.go Use upstream slack-go/slack again (#1018) 4 years ago
block_conv.go Use upstream slack-go/slack again (#1018) 4 years ago
block_divider.go Use upstream slack-go/slack again (#1018) 4 years ago
block_element.go Use upstream slack-go/slack again (#1018) 4 years ago
block_image.go Use upstream slack-go/slack again (#1018) 4 years ago
block_input.go Use upstream slack-go/slack again (#1018) 4 years ago
block_object.go Use upstream slack-go/slack again (#1018) 4 years ago
block_section.go Use upstream slack-go/slack again (#1018) 4 years ago
bots.go Use upstream slack-go/slack again (#1018) 4 years ago
channels.go Use upstream slack-go/slack again (#1018) 4 years ago
chat.go Use upstream slack-go/slack again (#1018) 4 years ago
comment.go Use upstream slack-go/slack again (#1018) 4 years ago
conversation.go Use upstream slack-go/slack again (#1018) 4 years ago
dialog.go Use upstream slack-go/slack again (#1018) 4 years ago
dialog_select.go Use upstream slack-go/slack again (#1018) 4 years ago
dialog_text.go Use upstream slack-go/slack again (#1018) 4 years ago
dnd.go Use upstream slack-go/slack again (#1018) 4 years ago
emoji.go Use upstream slack-go/slack again (#1018) 4 years ago
errors.go Use upstream slack-go/slack again (#1018) 4 years ago
files.go Use upstream slack-go/slack again (#1018) 4 years ago
go.mod Use upstream slack-go/slack again (#1018) 4 years ago
go.sum Use upstream slack-go/slack again (#1018) 4 years ago
groups.go Use upstream slack-go/slack again (#1018) 4 years ago
history.go Use upstream slack-go/slack again (#1018) 4 years ago
im.go Use upstream slack-go/slack again (#1018) 4 years ago
info.go Use upstream slack-go/slack again (#1018) 4 years ago
interactions.go Use upstream slack-go/slack again (#1018) 4 years ago
item.go Use upstream slack-go/slack again (#1018) 4 years ago
logger.go Use upstream slack-go/slack again (#1018) 4 years ago
messageID.go Use upstream slack-go/slack again (#1018) 4 years ago
messages.go Use upstream slack-go/slack again (#1018) 4 years ago
misc.go Use upstream slack-go/slack again (#1018) 4 years ago
oauth.go Use upstream slack-go/slack again (#1018) 4 years ago
pagination.go Use upstream slack-go/slack again (#1018) 4 years ago
pins.go Use upstream slack-go/slack again (#1018) 4 years ago
reactions.go Use upstream slack-go/slack again (#1018) 4 years ago
reminders.go Use upstream slack-go/slack again (#1018) 4 years ago
rtm.go Use upstream slack-go/slack again (#1018) 4 years ago
search.go Use upstream slack-go/slack again (#1018) 4 years ago
security.go Use upstream slack-go/slack again (#1018) 4 years ago
slack.go Use upstream slack-go/slack again (#1018) 4 years ago
slash.go Use upstream slack-go/slack again (#1018) 4 years ago
stars.go Use upstream slack-go/slack again (#1018) 4 years ago
team.go Use upstream slack-go/slack again (#1018) 4 years ago
usergroups.go Use upstream slack-go/slack again (#1018) 4 years ago
users.go Use upstream slack-go/slack again (#1018) 4 years ago
views.go Use upstream slack-go/slack again (#1018) 4 years ago
webhooks.go Use upstream slack-go/slack again (#1018) 4 years ago
webhooks_go112.go Use upstream slack-go/slack again (#1018) 4 years ago
webhooks_go113.go Use upstream slack-go/slack again (#1018) 4 years ago
websocket.go Use upstream slack-go/slack again (#1018) 4 years ago
websocket_channels.go Use upstream slack-go/slack again (#1018) 4 years ago
websocket_desktop_notification.go Use upstream slack-go/slack again (#1018) 4 years ago
websocket_dm.go Use upstream slack-go/slack again (#1018) 4 years ago
websocket_dnd.go Use upstream slack-go/slack again (#1018) 4 years ago
websocket_files.go Use upstream slack-go/slack again (#1018) 4 years ago
websocket_groups.go Use upstream slack-go/slack again (#1018) 4 years ago
websocket_internals.go Use upstream slack-go/slack again (#1018) 4 years ago
websocket_managed_conn.go Use upstream slack-go/slack again (#1018) 4 years ago
websocket_misc.go Use upstream slack-go/slack again (#1018) 4 years ago
websocket_pins.go Use upstream slack-go/slack again (#1018) 4 years ago
websocket_reactions.go Use upstream slack-go/slack again (#1018) 4 years ago
websocket_stars.go Use upstream slack-go/slack again (#1018) 4 years ago
websocket_subteam.go Use upstream slack-go/slack again (#1018) 4 years ago
websocket_teams.go Use upstream slack-go/slack again (#1018) 4 years ago

README.md

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