Slack Webhook integration

Slack WebHook Integration for Java

Лицензия

Лицензия

Категории

Категории

Сеть
Группа

Группа

net.gpedro.integrations.slack
Идентификатор

Идентификатор

slack-webhook
Последняя версия

Последняя версия

1.4.0
Дата

Дата

Тип

Тип

jar
Описание

Описание

Slack Webhook integration
Slack WebHook Integration for Java
Ссылка на сайт

Ссылка на сайт

https://github.com/gpedro/slack-webhook
Система контроля версий

Система контроля версий

https://github.com/gpedro/slack-webhook

Скачать slack-webhook

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/net.gpedro.integrations.slack/slack-webhook/ -->
<dependency>
    <groupId>net.gpedro.integrations.slack</groupId>
    <artifactId>slack-webhook</artifactId>
    <version>1.4.0</version>
</dependency>
// https://jarcasting.com/artifacts/net.gpedro.integrations.slack/slack-webhook/
implementation 'net.gpedro.integrations.slack:slack-webhook:1.4.0'
// https://jarcasting.com/artifacts/net.gpedro.integrations.slack/slack-webhook/
implementation ("net.gpedro.integrations.slack:slack-webhook:1.4.0")
'net.gpedro.integrations.slack:slack-webhook:jar:1.4.0'
<dependency org="net.gpedro.integrations.slack" name="slack-webhook" rev="1.4.0">
  <artifact name="slack-webhook" type="jar" />
</dependency>
@Grapes(
@Grab(group='net.gpedro.integrations.slack', module='slack-webhook', version='1.4.0')
)
libraryDependencies += "net.gpedro.integrations.slack" % "slack-webhook" % "1.4.0"
[net.gpedro.integrations.slack/slack-webhook "1.4.0"]

Зависимости

compile (1)

Идентификатор библиотеки Тип Версия
com.google.code.gson : gson jar 2.3.1

Модули Проекта

Данный проект не имеет модулей.

slack-webhook

Slack 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));

Installation

Add the following dependency in pom.xml

<dependency>
  <groupId>net.gpedro.integrations.slack</groupId>
  <artifactId>slack-webhook</artifactId>
  <version>1.4.0</version>
</dependency>

Configuration

  1. Go to your_team.slack.com/services/new
  2. Search for Incoming WebHook and click in Add
  3. Choose Channel to Post and press Add Incoming WebHooks Integration
  4. Into Setup Instructions, you've a WebHook URL. He is the argument you must pass the constructor. Then, copy it.

Change Log

  • 1.4.0
    • Added footer, footer-icon, ts (#24) and link_names (#25) attributes
  • 1.3.0
    • Added Slack Actions (thanks @galimru)
  • 1.2.1
    • Improved MatterMost Compatibility
  • 1.2.0
    • Added Support for Proxy
  • 1.1.2
    • Added Support for Markdown in SlackAttachment
  • 1.1.1
    • General Improvements
  • 1.0.0
    • Init (:

Версии библиотеки

Версия
1.4.0
1.3.0
1.2.1
1.2.0
1.1.2
1.1.1