Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/augmentedlogic/simple-slack-java
- Owner: augmentedlogic
- License: mit
- Created: 2020-08-04T09:33:06.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2023-08-09T13:00:03.000Z (over 1 year ago)
- Last Synced: 2023-08-09T14:17:06.313Z (over 1 year ago)
- Topics: java, slack
- Language: Java
- Homepage:
- Size: 17.6 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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```