GithubHelp home page GithubHelp logo

slack-webhook's Introduction

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

Installation

Add the following dependency in pom.xml

<dependency>
  <groupId>net.gpedro.integrations.slack</groupId>
  <artifactId>slack-webhook</artifactId>
  <version>1.3.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.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 (:

slack-webhook's People

Contributors

gpedro avatar thesmith avatar chrylis avatar prowave avatar galimru avatar jan-domozilov avatar rpardini avatar timbuethe avatar minecrafter avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.