开源软件名称(OpenSource Name):gpedro/slack-webhook开源软件地址(OpenSource Url):https://github.com/gpedro/slack-webhook开源编程语言(OpenSource Language):Java 100.0%开源软件介绍(OpenSource Introduction):slack-webhookSlack WebHook Integration for Java Basic Examples// Send simple message
SlackApi api = new SlackApi("https://hooks.slack.com/services/id_1/id_2/token");
api.call(new SlackMessage("my message"));
// Send simple message with custom name
SlackApi api = new SlackApi("https://hooks.slack.com/services/id_1/id_2/token");
api.call(new SlackMessage("Mafagafo", "my message"));
// Send simple message in different room
SlackApi api = new SlackApi("https://hooks.slack.com/services/id_1/id_2/token");
api.call(new SlackMessage("#general", null, "my message"));
// Send simple message in different room with custom name
SlackApi api = new SlackApi("https://hooks.slack.com/services/id_1/id_2/token");
api.call(new SlackMessage("#general", "Mafagafo", "my message"));
// Send simple message in different room with custom name and tag someone in the message so he will get notified
SlackApi api = new SlackApi("https://hooks.slack.com/services/id_1/id_2/token");
api.call(new SlackMessage("#general", "Mafagafo", "Hi @gpedro : your API rocks").setLinkNames(true));
InstallationAdd the following dependency in pom.xml <dependency>
<groupId>net.gpedro.integrations.slack</groupId>
<artifactId>slack-webhook</artifactId>
<version>1.4.0</version>
</dependency> Configuration
Change Log
|
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论