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 075a84427f
Update vendor (#1265)
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 Update dependencies for 1.18.0 release (#1175) 4 years ago
CHANGELOG.md Update vendor (#1257) 4 years ago
LICENSE Use upstream slack-go/slack again (#1018) 4 years ago
Makefile Update vendor slack-go/slack (#1068) 4 years ago
README.md Update vendor (#1257) 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
apps.go Update vendor (#1265) 4 years ago
attachments.go Update vendor (#1228) 4 years ago
auth.go Update vendor slack-go/slack (#1068) 4 years ago
backoff.go Use upstream slack-go/slack again (#1018) 4 years ago
block.go Update vendor (#1228) 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 Update vendor (#1228) 4 years ago
block_divider.go Use upstream slack-go/slack again (#1018) 4 years ago
block_element.go Update vendor (#1257) 4 years ago
block_file.go Update vendor slack-go/slack (#1068) 4 years ago
block_header.go Update vendor (#1228) 4 years ago
block_image.go Update dependencies for 1.18.0 release (#1175) 4 years ago
block_input.go Update vendor slack-go/slack (#1068) 4 years ago
block_object.go Update vendor (#1257) 4 years ago
block_section.go Use upstream slack-go/slack again (#1018) 4 years ago
block_unknown.go Update vendor slack-go/slack (#1068) 4 years ago
bots.go Use upstream slack-go/slack again (#1018) 4 years ago
channels.go Update vendor slack-go/slack (#1068) 4 years ago
chat.go Update vendor (#1257) 4 years ago
comment.go Use upstream slack-go/slack again (#1018) 4 years ago
conversation.go Update vendor (#1257) 4 years ago
dialog.go Update vendor (#1265) 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 Update vendor (#1228) 4 years ago
files.go Use upstream slack-go/slack again (#1018) 4 years ago
go.mod Update dependencies for 1.18.0 release (#1175) 4 years ago
go.sum Update vendor (#1257) 4 years ago
groups.go Update dependencies / vendor (#1146) 4 years ago
history.go Update dependencies / vendor (#1146) 4 years ago
im.go Use upstream slack-go/slack again (#1018) 4 years ago
info.go Update vendor slack-go/slack (#1068) 4 years ago
interactions.go Update vendor (#1265) 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
logo.png Update vendor (#1257) 4 years ago
messageID.go Use upstream slack-go/slack again (#1018) 4 years ago
messages.go Update vendor (#1257) 4 years ago
misc.go Update vendor (#1257) 4 years ago
oauth.go Update vendor (#1228) 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 Update vendor (#1265) 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 Update vendor (#1265) 4 years ago
slash.go Update vendor (#1265) 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 Update vendor (#1257) 4 years ago
views.go Update vendor (#1228) 4 years ago
webhooks.go Update dependencies for 1.18.0 release (#1175) 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 Update vendor slack-go/slack (#1068) 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 Update dependencies / vendor (#1146) 4 years ago
websocket_misc.go Use upstream slack-go/slack again (#1018) 4 years ago
websocket_mobile_in_app_notification.go Update vendor slack-go/slack (#1068) 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

logo

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.

Project Status

There is currently no major version released. Therefore, minor version releases may include backward incompatible changes.

See CHANGELOG.md for more information about the changes.

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