5
0
mirror of https://github.com/cwinfo/matterbridge.git synced 2024-11-14 09:40:26 +00:00
matterbridge/vendor/github.com/slack-go/slack
Wim 4dd8bae5c9
Update dependencies (#1610)
* Update dependencies

* Update module to go 1.17
2021-10-17 00:47:22 +02:00
..
internal Update vendor (#1384) 2021-02-01 21:29:04 +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
.golangci.yml Update vendor for next release (#1343) 2020-12-31 14:48:12 +01:00
admin.go Use upstream slack-go/slack again (#1018) 2020-03-01 20:59:19 +01:00
apps.go Update vendor (#1461) 2021-05-05 22:03:28 +02:00
attachments.go Update vendor (#1461) 2021-05-05 22:03:28 +02:00
audit.go Update dependencies (#1610) 2021-10-17 00:47:22 +02:00
auth.go Update vendor slack-go/slack (#1068) 2020-03-28 23:50:47 +01:00
block_action.go Update vendor for next release (#1343) 2020-12-31 14:48:12 +01:00
block_context.go Update dependencies (#1610) 2021-10-17 00:47:22 +02:00
block_conv.go Update vendor (#1461) 2021-05-05 22:03:28 +02:00
block_divider.go Use upstream slack-go/slack again (#1018) 2020-03-01 20:59:19 +01:00
block_element.go Update vendor (#1414) 2021-03-20 22:40:23 +01:00
block_file.go Update vendor slack-go/slack (#1068) 2020-03-28 23:50:47 +01:00
block_header.go Update vendor (#1228) 2020-09-04 23:29:13 +02: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 (#1414) 2021-03-20 22:40:23 +01:00
block_object.go Update vendor (#1414) 2021-03-20 22:40:23 +01: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 vendor (#1461) 2021-05-05 22:03:28 +02:00
bots.go Use upstream slack-go/slack again (#1018) 2020-03-01 20:59:19 +01:00
CHANGELOG.md Update vendor (#1257) 2020-10-11 23:07:00 +02:00
channels.go Update vendor (#1461) 2021-05-05 22:03:28 +02:00
chat.go Update vendor (#1461) 2021-05-05 22:03:28 +02:00
comment.go Use upstream slack-go/slack again (#1018) 2020-03-01 20:59:19 +01:00
conversation.go Update vendor (#1560) 2021-07-31 18:27:55 +02:00
dialog_select.go Update vendor (#1560) 2021-07-31 18:27:55 +02:00
dialog_text.go Use upstream slack-go/slack again (#1018) 2020-03-01 20:59:19 +01:00
dialog.go Update vendor (#1265) 2020-10-19 23:40:00 +02: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 Update vendor (#1228) 2020-09-04 23:29:13 +02:00
files.go Update vendor (#1498) 2021-05-30 00:25:30 +02:00
groups.go Update vendor (#1461) 2021-05-05 22:03:28 +02:00
history.go Update dependencies / vendor (#1146) 2020-05-24 00:06:21 +02:00
im.go Update vendor (#1461) 2021-05-05 22:03:28 +02:00
info.go Update vendor (#1461) 2021-05-05 22:03:28 +02:00
interactions.go Update dependencies (#1610) 2021-10-17 00:47:22 +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 Update vendor for next release (#1343) 2020-12-31 14:48:12 +01:00
logo.png Update vendor (#1257) 2020-10-11 23:07:00 +02: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 vendor (#1257) 2020-10-11 23:07:00 +02:00
misc.go Update vendor (#1461) 2021-05-05 22:03:28 +02:00
oauth.go Update vendor (#1228) 2020-09-04 23:29:13 +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 Update dependencies (#1610) 2021-10-17 00:47:22 +02:00
reminders.go Update vendor (#1414) 2021-03-20 22:40:23 +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 Update vendor for next release (#1343) 2020-12-31 14:48:12 +01:00
slack.go Update vendor (#1461) 2021-05-05 22:03:28 +02:00
slash.go Update vendor (#1265) 2020-10-19 23:40:00 +02:00
socket_mode.go Update vendor (#1384) 2021-02-01 21:29:04 +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 vendor (#1461) 2021-05-05 22:03:28 +02:00
views.go Update vendor (#1498) 2021-05-30 00:25:30 +02: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 Update vendor (#1414) 2021-03-20 22:40:23 +01:00
websocket_managed_conn.go Update vendor (#1414) 2021-03-20 22:40:23 +01: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 Go Reference

This is the original Slack library for Go created by Norberto Lopes, 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 or Releases 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.GetUserGroups(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