maven
<dependency>
<groupId>io.evanwong.oss</groupId>
<artifactId>hipchat-java</artifactId>
<version>0.4.2</version>
</dependency>
实例
@Test
public void hipchat() throws ExecutionException, InterruptedException {
HipChatClient client = new HipChatClient(notificationToken);
SendRoomNotificationRequestBuilder builder = client.prepareSendRoomNotificationRequestBuilder("errorlog", "Some <b>html</b>, <entities>, and a <a href=\"https://www.hipchat.com\">link</a>.<br />We can even use line breaks!");
Future<NoContent> future = builder.setColor(MessageColor.YELLOW).setNotify(true).build().execute();
NoContent noContent = future.get();
System.out.println(noContent);
}
本文介绍如何通过hipchat-java库向HipChat发送带有HTML格式的消息通知,包括设置消息颜色和启用通知等功能。
1760

被折叠的 条评论
为什么被折叠?



