evanwong / hipchat-java Goto Github PK
View Code? Open in Web Editor NEWJava client for the HipChat v2 API
License: MIT License
Java client for the HipChat v2 API
License: MIT License
In Request.java, this line should be added in order to prevent the client from failing if Atlassian adds new fields:
this.objectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
Currently I am getting this exception:
com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: Unrecognized field "version" (class io.evanwong.oss.hipchat.v2.rooms.RoomItem), not marked as ignorable (3 known properties: "links", "id", "name"])
Just a typo, but the method is calling itself instead of its homonym:
Tried your sample code in the readme file.
String defaultAccessToken = "22222-mytoken";
HipChatClient client = new HipChatClient(defaultAccessToken);
SendRoomNotificationRequestBuilder builder = client.prepareSendRoomNotificationRequestBuilder("room-test-1","this is my first message");
java.util.concurrent.Future future;
future = builder.setColor(MessageColor.YELLOW).setNotify(true).build().execute();
and got the following compilation errors in the last line of code;
- The type io.evanwong.oss.hipchat.v2.commons.Request cannot be resolved. It is indirectly referenced from
required .class files
- The method execute() is undefined for the type SendRoomNotificationRequest
quick reply is much appreciated.
thanks in advance.
Is there a method for setting the URL of the HipChat server? (I want to send a message to a room)
Many of us still uses Java 7, especially in old projects. Would be possible to make a Java 7 compatible jar?
I wish I can avoid DEBUG and INFO level log messages.
hi!
I am using the example in the readme, but it does not work:
try {
String defaultAccessToken = "xxxxx";
HipChatClient client = new HipChatClient(defaultAccessToken);
SendRoomNotificationRequestBuilder builder = client.prepareSendRoomNotificationRequestBuilder("test", "hello world!");
Future<NoContent> future = builder.setColor(MessageColor.YELLOW).setNotify(true).build().execute();
//optional... if you want/need to inspect the result:
NoContent noContent = future.get();
} catch(Exception e) {
LOG.error("exception", e);
}
this is returning:
2015-03-13 14:11:29,821 ERROR [-1:?] [io.evanwong.oss.hipchat.v2.commons.PostRequest] Invalid response status: 401, content: {
"error": {
"code": 401,
"message": "Invalid OAuth session",
"type": "Unauthorized"
}
}
And I do not see any OAUTH related methods on the HipChat client.
how do I get this to work? What am I doing wrong?
There seems to be no way to provide HipChat server URL for on premise HipChat installations.
Hi,
first of all thank you for maintaining a backwards compatible version of the API.
We could use the User API which the 0.4.0 of the Java 7 release does not provide yet.
Could you please release the new version to Maven central?
Thanks and cheers,
Michael
I recently integrated this library (v0.3.0) in an existing project, where I was using v1 hipchat API. Here is more or less how I use it : I have a static HipChat object in method in MyClass
private static final HipChatClient hcc = new HipChatClient("mytoken") ;
private static void sendMessageImpl(String message, MessageColor color,boolean critical) {
//some stuff then prepare the query
SendRoomNotificationRequestBuilder builder = hcc.prepareSendRoomNotificationRequestBuilder("myroomId", "message to send");
Future<NoContent> future = builder.setColor(colorToUse).setNotify(notify).build().execute();
NoContent noContent = future.get();
I have a timer that calls MyCalls.sendMessageImpl(...) every two minutes, multiple times.
I recently started to receive reports of memory leaks happening. A further investigation with JProfiler revealed that I had a steadily growing number of new threads (blocked) .
After some hours the number of threads was in the order of thousands, and in 48 hours, boom.
Interestingly enough, when turning hipchat off, the number of threads is steady , as it should be : 6.
Am I doing something wrong? is this a known problem? am I using an old version? It consumed one day of work finding this.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.