Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/augmentedlogic/simple-slack-java

Simple client to send a message to a slack channel
https://github.com/augmentedlogic/simple-slack-java

java slack

Last synced: about 2 months ago
JSON representation

Simple client to send a message to a slack channel

Awesome Lists containing this project

README

        

# simple-slack-java
Simple client to send a message to a slack channel

## Usage

```java

import com.augmentedlogic.simpleslack.SlackMessage;

```

```java

try {

SlackMessage slackMessage = new SlackMessage();
slackMessage.setHook("https://hooks.slack.com/services/XXXXXXX/XXXXXXXX/XXXXXXX");
slackMessage.setMessage("Hello World");
slackMessage.setUsername("bot"); // optional, default: "bot"
slackMessage.setChannel("general"); // optional, default: "general"
slackMessage.setEmoji(":robot_face:"); // optional, default: ":robot_face:"
slackMessage.send();

} catch(Exception e) {

// do whatever you like

}

```

## via maven

```

com.augmentedlogic.simpleslack
simple-slack
0.6

```