gradle build
First, create an instance of the slack API with the SlackAPIFactory
:
SlackAPI slackAPI = SlackAPIFactory.newSlackFactory()
.setClientId("test-id")
.setClientSecret("test-secret")
.build();
Then, post a message to channel:
Message test = Message.builder()
.setToken("test")
.setText("hello world")
.setChannel("@dg")
.setAsUser(true)
.build();
underTest.postMessage(test);