All Projects → slack-go → Slack

slack-go / Slack

Licence: bsd-2-clause
Slack API in Go - community-maintained fork created by the original author, @nlopes

Programming Languages

go
31211 projects - #10 most used programming language
Makefile
30231 projects

Labels

Projects that are alternatives of or similar to Slack

Papercups
Open-source live customer chat
Stars: ✭ 4,554 (+21.63%)
Mutual labels:  slack
Terraform Aws Notify Slack
Terraform module which creates SNS topic and Lambda function which sends notifications to Slack
Stars: ✭ 290 (-92.25%)
Mutual labels:  slack
Kube Slack
Kubernetes Slack Monitoring
Stars: ✭ 321 (-91.43%)
Mutual labels:  slack
Awesome Slack
🕶️ List of communities powered by Slack.
Stars: ✭ 274 (-92.68%)
Mutual labels:  slack
Slack History Export
A NPM module that allows slack users export their history
Stars: ✭ 284 (-92.41%)
Mutual labels:  slack
Slack Emojinator
Bulk upload emoji into Slack
Stars: ✭ 296 (-92.09%)
Mutual labels:  slack
Cordova Plugin Native Keyboard
🎹 Add a Slack / WhatsApp - style chat keyboard to your Cordova app!
Stars: ✭ 271 (-92.76%)
Mutual labels:  slack
Slack Cleaner
delete slack messages and files. An improved version is at:
Stars: ✭ 329 (-91.21%)
Mutual labels:  slack
Cdk Constructs
A collection of higher-level aws cdk constructs: slack-approval-workflow, #slack & msteams notifications, chatops, blue-green-container-deployment, codecommit-backup, OWASP dependency-check, contentful-webhook, github-webhook, stripe-webhook, static-website, pull-request-check, pull-request-approval-rule, codepipeline-merge-action, codepipeline-check-parameter-action...
Stars: ✭ 282 (-92.47%)
Mutual labels:  slack
Action Slack
Provides the function of slack notification to GitHub Actions.
Stars: ✭ 310 (-91.72%)
Mutual labels:  slack
Vagas Java
Mural de vagas para desenvolvedores Java
Stars: ✭ 276 (-92.63%)
Mutual labels:  slack
Workbase Server
Slack alternative, email integrated, build with Meteor
Stars: ✭ 284 (-92.41%)
Mutual labels:  slack
Python Slack Sdk
Slack Developer Kit for Python
Stars: ✭ 3,307 (-11.67%)
Mutual labels:  slack
Node Slack Sdk
Slack Developer Kit for Node.js
Stars: ✭ 2,988 (-20.19%)
Mutual labels:  slack
Slack Meme
A Meme Bot for Slack.
Stars: ✭ 322 (-91.4%)
Mutual labels:  slack
Python Slack Events Api
Slack Events API adapter for Python (Flask required)
Stars: ✭ 272 (-92.74%)
Mutual labels:  slack
Phanbook
A Q&A and Forum PHP platform
Stars: ✭ 294 (-92.15%)
Mutual labels:  slack
Themer Gui
A graphical UI for themer. Replaced by Progressive Web App at https://themer.dev.
Stars: ✭ 337 (-91%)
Mutual labels:  slack
Rigel
🌌 Colorscheme for vim, terminal, vscode and slack - based on the star Rigel ✨.
Stars: ✭ 324 (-91.35%)
Mutual labels:  slack
Yetibot
🤖 Extreme chatops bot for Slack and IRC 🔧 New contributors welcome 🏗
Stars: ✭ 311 (-91.69%)
Mutual labels:  slack

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

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].