{"id":13414080,"url":"https://github.com/slack-go/slack","last_synced_at":"2025-05-13T10:58:39.904Z","repository":{"id":26330205,"uuid":"29778781","full_name":"slack-go/slack","owner":"slack-go","description":"Slack API in Go","archived":false,"fork":false,"pushed_at":"2025-03-31T06:49:45.000Z","size":2504,"stargazers_count":4763,"open_issues_count":115,"forks_count":1160,"subscribers_count":52,"default_branch":"master","last_synced_at":"2025-04-28T10:53:27.502Z","etag":null,"topics":["go","golang","slack"],"latest_commit_sha":null,"homepage":"https://pkg.go.dev/github.com/slack-go/slack","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/slack-go.png","metadata":{"files":{"readme":"README.md","changelog":"history.go","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":"audit.go","citation":null,"codeowners":null,"security":"security.go","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"nlopes","buy_me_a_coffee":"nlopes"}},"created_at":"2015-01-24T14:19:00.000Z","updated_at":"2025-04-27T02:52:34.000Z","dependencies_parsed_at":"2023-02-19T17:21:40.578Z","dependency_job_id":"49921c58-db52-49f4-8d57-c2131f7633da","html_url":"https://github.com/slack-go/slack","commit_stats":{"total_commits":1232,"total_committers":406,"mean_commits":"3.0344827586206895","dds":0.9439935064935066,"last_synced_commit":"41fa1e5b4adad73cf664f8dedb80fb05d3e67eee"},"previous_names":[],"tags_count":52,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slack-go%2Fslack","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slack-go%2Fslack/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slack-go%2Fslack/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slack-go%2Fslack/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/slack-go","download_url":"https://codeload.github.com/slack-go/slack/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251320225,"owners_count":21570543,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["go","golang","slack"],"created_at":"2024-07-30T20:01:57.074Z","updated_at":"2025-05-05T17:43:06.131Z","avatar_url":"https://github.com/slack-go.png","language":"Go","readme":"Slack API in Go [![Go Reference](https://pkg.go.dev/badge/github.com/slack-go/slack.svg)](https://pkg.go.dev/github.com/slack-go/slack)\n===============\n\nThis is the original Slack library for Go created by Norberto Lopes, transferred to a GitHub organization.\n\nYou can also chat with us on the #slack-go, #slack-go-ja Slack channel on the Gophers Slack.\n\n![logo](logo.png \"icon\")\n\nThis library supports most if not all of the `api.slack.com` REST\ncalls, as well as the Real-Time Messaging protocol over websocket, in\na fully managed way.\n\n## Project Status\nThere is currently no major version released.\nTherefore, minor version releases may include backward incompatible changes.\n\nSee [Releases](https://github.com/slack-go/slack/releases) for more information about the changes.\n\n## Installing\n\n### *go get*\n\n    $ go get -u github.com/slack-go/slack\n\n## Example\n\n### Getting all groups\n\n```golang\nimport (\n\t\"fmt\"\n\n\t\"github.com/slack-go/slack\"\n)\n\nfunc main() {\n\tapi := slack.New(\"YOUR_TOKEN_HERE\")\n\t// If you set debugging, it will log all requests to the console\n\t// Useful when encountering issues\n\t// slack.New(\"YOUR_TOKEN_HERE\", slack.OptionDebug(true))\n\tgroups, err := api.GetUserGroups(slack.GetUserGroupsOptionIncludeUsers(false))\n\tif err != nil {\n\t\tfmt.Printf(\"%s\\n\", err)\n\t\treturn\n\t}\n\tfor _, group := range groups {\n\t\tfmt.Printf(\"ID: %s, Name: %s\\n\", group.ID, group.Name)\n\t}\n}\n```\n\n### Getting User Information\n\n```golang\nimport (\n    \"fmt\"\n\n    \"github.com/slack-go/slack\"\n)\n\nfunc main() {\n    api := slack.New(\"YOUR_TOKEN_HERE\")\n    user, err := api.GetUserInfo(\"U023BECGF\")\n    if err != nil {\n\t    fmt.Printf(\"%s\\n\", err)\n\t    return\n    }\n    fmt.Printf(\"ID: %s, Fullname: %s, Email: %s\\n\", user.ID, user.Profile.RealName, user.Profile.Email)\n}\n```\n\n## Minimal Socket Mode usage:\n\nSee https://github.com/slack-go/slack/blob/master/examples/socketmode/socketmode.go\n\n\n## Minimal RTM usage:\n\nAs mentioned in https://api.slack.com/rtm - for most applications, Socket Mode is a better way to communicate with Slack.\n\nSee https://github.com/slack-go/slack/blob/master/examples/websocket/websocket.go\n\n\n## Minimal EventsAPI usage:\n\nSee https://github.com/slack-go/slack/blob/master/examples/eventsapi/events.go\n\n## Socketmode Event Handler (Experimental)\n\nWhen using socket mode, dealing with an event can be pretty lengthy as it requires you to route the event to the right place.\n\nInstead, you can use `SocketmodeHandler` much like you use an HTTP handler to register which event you would like to listen to and what callback function will process that event when it occurs.\n\nSee [./examples/socketmode_handler/socketmode_handler.go](./examples/socketmode_handler/socketmode_handler.go)\n## Contributing\n\nYou are more than welcome to contribute to this project.  Fork and\nmake a Pull Request, or create an Issue if you see any problem.\n\nBefore making any Pull Request please run the following:\n\n```\nmake pr-prep\n```\n\nThis will check/update code formatting, linting and then run all tests\n\n## License\n\nBSD 2 Clause license\n","funding_links":["https://github.com/sponsors/nlopes","https://buymeacoffee.com/nlopes"],"categories":["第三方api","Third-party APIs","Go","第三方 API","Dependencies","Utility","Repositories"],"sub_categories":["实用程序/Miscellaneous","Utility/Miscellaneous","爬虫工具","Fail injection","HTTP Clients","Potential Issues"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fslack-go%2Fslack","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fslack-go%2Fslack","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fslack-go%2Fslack/lists"}