matterbridge/vendor/github.com/slack-go/slack
2020-07-18 17:27:41 +02:00
..
internal Use upstream slack-go/slack again (#1018) 2020-03-01 20:59:19 +01:00
slackutilsx Use upstream slack-go/slack again (#1018) 2020-03-01 20:59:19 +01:00
.gitignore Use upstream slack-go/slack again (#1018) 2020-03-01 20:59:19 +01:00
.gometalinter.json Use upstream slack-go/slack again (#1018) 2020-03-01 20:59:19 +01:00
.travis.yml Update dependencies for 1.18.0 release (#1175) 2020-07-18 17:27:41 +02:00
admin.go Use upstream slack-go/slack again (#1018) 2020-03-01 20:59:19 +01:00
attachments.go Use upstream slack-go/slack again (#1018) 2020-03-01 20:59:19 +01:00
auth.go Update vendor slack-go/slack (#1068) 2020-03-28 23:50:47 +01:00
backoff.go Use upstream slack-go/slack again (#1018) 2020-03-01 20:59:19 +01:00
block_action.go Use upstream slack-go/slack again (#1018) 2020-03-01 20:59:19 +01:00
block_context.go Use upstream slack-go/slack again (#1018) 2020-03-01 20:59:19 +01:00
block_conv.go Update dependencies for 1.18.0 release (#1175) 2020-07-18 17:27:41 +02:00
block_divider.go Use upstream slack-go/slack again (#1018) 2020-03-01 20:59:19 +01:00
block_element.go Update dependencies for 1.18.0 release (#1175) 2020-07-18 17:27:41 +02:00
block_file.go Update vendor slack-go/slack (#1068) 2020-03-28 23:50:47 +01:00
block_image.go Update dependencies for 1.18.0 release (#1175) 2020-07-18 17:27:41 +02:00
block_input.go Update vendor slack-go/slack (#1068) 2020-03-28 23:50:47 +01:00
block_object.go Update dependencies for 1.18.0 release (#1175) 2020-07-18 17:27:41 +02:00
block_section.go Use upstream slack-go/slack again (#1018) 2020-03-01 20:59:19 +01:00
block_unknown.go Update vendor slack-go/slack (#1068) 2020-03-28 23:50:47 +01:00
block.go Update dependencies for 1.18.0 release (#1175) 2020-07-18 17:27:41 +02:00
bots.go Use upstream slack-go/slack again (#1018) 2020-03-01 20:59:19 +01:00
CHANGELOG.md Use upstream slack-go/slack again (#1018) 2020-03-01 20:59:19 +01:00
channels.go Update vendor slack-go/slack (#1068) 2020-03-28 23:50:47 +01:00
chat.go Update dependencies for 1.18.0 release (#1175) 2020-07-18 17:27:41 +02:00
comment.go Use upstream slack-go/slack again (#1018) 2020-03-01 20:59:19 +01:00
conversation.go Use upstream slack-go/slack again (#1018) 2020-03-01 20:59:19 +01:00
dialog_select.go Use upstream slack-go/slack again (#1018) 2020-03-01 20:59:19 +01:00
dialog_text.go Use upstream slack-go/slack again (#1018) 2020-03-01 20:59:19 +01:00
dialog.go Use upstream slack-go/slack again (#1018) 2020-03-01 20:59:19 +01:00
dnd.go Use upstream slack-go/slack again (#1018) 2020-03-01 20:59:19 +01:00
emoji.go Use upstream slack-go/slack again (#1018) 2020-03-01 20:59:19 +01:00
errors.go Use upstream slack-go/slack again (#1018) 2020-03-01 20:59:19 +01:00
files.go Use upstream slack-go/slack again (#1018) 2020-03-01 20:59:19 +01:00
go.mod Update dependencies for 1.18.0 release (#1175) 2020-07-18 17:27:41 +02:00
go.sum Update dependencies for 1.18.0 release (#1175) 2020-07-18 17:27:41 +02:00
groups.go Update dependencies / vendor (#1146) 2020-05-24 00:06:21 +02:00
history.go Update dependencies / vendor (#1146) 2020-05-24 00:06:21 +02:00
im.go Use upstream slack-go/slack again (#1018) 2020-03-01 20:59:19 +01:00
info.go Update vendor slack-go/slack (#1068) 2020-03-28 23:50:47 +01:00
interactions.go Update dependencies for 1.18.0 release (#1175) 2020-07-18 17:27:41 +02:00
item.go Use upstream slack-go/slack again (#1018) 2020-03-01 20:59:19 +01:00
LICENSE Use upstream slack-go/slack again (#1018) 2020-03-01 20:59:19 +01:00
logger.go Use upstream slack-go/slack again (#1018) 2020-03-01 20:59:19 +01:00
Makefile Update vendor slack-go/slack (#1068) 2020-03-28 23:50:47 +01:00
messageID.go Use upstream slack-go/slack again (#1018) 2020-03-01 20:59:19 +01:00
messages.go Update dependencies / vendor (#1146) 2020-05-24 00:06:21 +02:00
misc.go Use upstream slack-go/slack again (#1018) 2020-03-01 20:59:19 +01:00
oauth.go Update dependencies for 1.18.0 release (#1175) 2020-07-18 17:27:41 +02:00
pagination.go Use upstream slack-go/slack again (#1018) 2020-03-01 20:59:19 +01:00
pins.go Use upstream slack-go/slack again (#1018) 2020-03-01 20:59:19 +01:00
reactions.go Use upstream slack-go/slack again (#1018) 2020-03-01 20:59:19 +01:00
README.md Use upstream slack-go/slack again (#1018) 2020-03-01 20:59:19 +01:00
reminders.go Use upstream slack-go/slack again (#1018) 2020-03-01 20:59:19 +01:00
rtm.go Use upstream slack-go/slack again (#1018) 2020-03-01 20:59:19 +01:00
search.go Use upstream slack-go/slack again (#1018) 2020-03-01 20:59:19 +01:00
security.go Use upstream slack-go/slack again (#1018) 2020-03-01 20:59:19 +01:00
slack.go Use upstream slack-go/slack again (#1018) 2020-03-01 20:59:19 +01:00
slash.go Use upstream slack-go/slack again (#1018) 2020-03-01 20:59:19 +01:00
stars.go Use upstream slack-go/slack again (#1018) 2020-03-01 20:59:19 +01:00
team.go Use upstream slack-go/slack again (#1018) 2020-03-01 20:59:19 +01:00
TODO.txt Use upstream slack-go/slack again (#1018) 2020-03-01 20:59:19 +01:00
usergroups.go Use upstream slack-go/slack again (#1018) 2020-03-01 20:59:19 +01:00
users.go Update dependencies / vendor (#1146) 2020-05-24 00:06:21 +02:00
views.go Update vendor slack-go/slack (#1068) 2020-03-28 23:50:47 +01:00
webhooks_go112.go Use upstream slack-go/slack again (#1018) 2020-03-01 20:59:19 +01:00
webhooks_go113.go Use upstream slack-go/slack again (#1018) 2020-03-01 20:59:19 +01:00
webhooks.go Update dependencies for 1.18.0 release (#1175) 2020-07-18 17:27:41 +02:00
websocket_channels.go Update vendor slack-go/slack (#1068) 2020-03-28 23:50:47 +01:00
websocket_desktop_notification.go Use upstream slack-go/slack again (#1018) 2020-03-01 20:59:19 +01:00
websocket_dm.go Use upstream slack-go/slack again (#1018) 2020-03-01 20:59:19 +01:00
websocket_dnd.go Use upstream slack-go/slack again (#1018) 2020-03-01 20:59:19 +01:00
websocket_files.go Use upstream slack-go/slack again (#1018) 2020-03-01 20:59:19 +01:00
websocket_groups.go Use upstream slack-go/slack again (#1018) 2020-03-01 20:59:19 +01:00
websocket_internals.go Use upstream slack-go/slack again (#1018) 2020-03-01 20:59:19 +01:00
websocket_managed_conn.go Update dependencies / vendor (#1146) 2020-05-24 00:06:21 +02:00
websocket_misc.go Use upstream slack-go/slack again (#1018) 2020-03-01 20:59:19 +01:00
websocket_mobile_in_app_notification.go Update vendor slack-go/slack (#1068) 2020-03-28 23:50:47 +01:00
websocket_pins.go Use upstream slack-go/slack again (#1018) 2020-03-01 20:59:19 +01:00
websocket_reactions.go Use upstream slack-go/slack again (#1018) 2020-03-01 20:59:19 +01:00
websocket_stars.go Use upstream slack-go/slack again (#1018) 2020-03-01 20:59:19 +01:00
websocket_subteam.go Use upstream slack-go/slack again (#1018) 2020-03-01 20:59:19 +01:00
websocket_teams.go Use upstream slack-go/slack again (#1018) 2020-03-01 20:59:19 +01:00
websocket.go Use upstream slack-go/slack again (#1018) 2020-03-01 20:59:19 +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