Slack Webhook (Java)

Slack Webhook API in Java

Лицензия

Лицензия

Категории

Категории

Java Языки программирования Ant Компиляция и сборка
Группа

Группа

in.ashwanthkumar
Идентификатор

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

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

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

0.0.10
Дата

Дата

Тип

Тип

jar
Описание

Описание

Slack Webhook (Java)
Slack Webhook API in Java
Ссылка на сайт

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

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

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

https://github.com/ashwanthkumar/slack-java-webhook

Скачать slack-java-webhook

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

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

Зависимости

compile (3)

Идентификатор библиотеки Тип Версия
in.ashwanthkumar : my-java-utils jar 0.0.7
com.google.code.gson : gson jar 2.3.1
com.google.http-client : google-http-client-gson jar 1.19.0

test (3)

Идентификатор библиотеки Тип Версия
junit : junit jar 4.10
org.hamcrest : hamcrest-all jar 1.1
org.mockito : mockito-all jar 1.10.19

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

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

Build Status

slack-java-webhook

Java Client to Slack's Webhook feature.

Dependencies

For Maven,

<dependency>
  <groupId>in.ashwanthkumar</groupId>
  <artifactId>slack-java-webhook</artifactId>
  <version>${slack-java-webhook.version}</version>
</dependency>

For SBT,

libraryDependencies += "in.ashwanthkumar" % "slack-java-webhook" % scalaJavaWebhookVersion

Latest version of slack-java-webhook is scala-java-webhook on Maven Central

Usage

// Using SlackMessage
new Slack(webhookUrl)
    .icon(":smiling_imp:") // Ref - http://www.emoji-cheat-sheet.com/
    .sendToUser("slackbot")
    .displayName("slack-java-client")
    .push(new SlackMessage("Text from my ").bold("Slack-Java-Client"));

// Using SlackAttachment
new Slack(webhookUrl)
    .sendToUser("slackbot")
    .displayName("slack-java-client")
    .push(new SlackAttachment("Text from my Slack-Java-Client").author("ashwanthkumar", "https://avatars0.githubusercontent.com/u/600279?v=3&s=40"));

Notes

With SlackMessage you can create rich text as specified in https://api.slack.com/docs/formatting. Example usage

new SlackMessage("Some text can be")
    .italic("Italic")
    .text(". :)")

Available methods on SlackMessage

  • text
  • link
  • bold
  • italic
  • code
  • preformatted
  • quote

With SlackAttachment you can create much more sophisticated rich text as specified in https://api.slack.com/docs/attachments. Example usage

new SlackAttachment()
    .author("ashwanthkumar")
    .author("ashwanthkumar", "https://avatars0.githubusercontent.com/u/600279?v=3&s=40")

Available methods on SlackAttachment

  • fallback
  • color
  • preText
  • author
  • title
  • text
  • imageUrl
  • addField

License

http://www.apache.org/licenses/LICENSE-2.0

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

Версия
0.0.10
0.0.9
0.0.8
0.0.7
0.0.6
0.0.5
0.0.4
0.0.3
0.0.2
0.0.1