使用java api对hipchat发送notification

maven

        
            io.evanwong.oss
            hipchat-java
            0.4.2
        

实例

@Test
    public void hipchat() throws ExecutionException, InterruptedException {
        HipChatClient client = new HipChatClient(notificationToken);
        SendRoomNotificationRequestBuilder builder = client.prepareSendRoomNotificationRequestBuilder("errorlog", "Some html, <entities>, and a link.
We can even use line breaks!"); Future future = builder.setColor(MessageColor.YELLOW).setNotify(true).build().execute(); NoContent noContent = future.get(); System.out.println(noContent); }

docs

  • hipchat-rest-api

  • hipchat-java

你可能感兴趣的:(chatops)