Skip to content
This repository was archived by the owner on Aug 28, 2025. It is now read-only.

Commit 9835eeb

Browse files
committed
v1.2.0
1 parent 3318400 commit 9835eeb

File tree

4 files changed

+19
-3
lines changed

4 files changed

+19
-3
lines changed
-7.78 KB
Binary file not shown.

lib/java-upwork.jar

-7.78 KB
Binary file not shown.

src/com/Upwork/api/Routers/Messages.java

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,16 +27,28 @@ public Messages(OAuthClient client) {
2727
oClient.setEntryPoint(ENTRY_POINT);
2828
}
2929

30-
/**
31-
* Retrive rooms information
30+
/**
31+
* Retrieve rooms information
3232
*
3333
* @param company Company ID
3434
* @throws JSONException If error occurred
35-
* @return {@link JSONObject}
35+
* @return {@link JSONObject}
3636
*/
3737
public JSONObject getRooms(String company) throws JSONException {
3838
return oClient.get("/messages/v3/" + company + "/rooms");
3939
}
40+
41+
/**
42+
* Retrieve rooms information with params
43+
*
44+
* @param company Company ID
45+
* @param params Parameters
46+
* @throws JSONException If error occurred
47+
* @return {@link JSONObject}
48+
*/
49+
public JSONObject getRooms(String company, HashMap<String, String> params) throws JSONException {
50+
return oClient.get("/messages/v3/" + company + "/rooms", params);
51+
}
4052

4153
/**
4254
* Get a specific room information

test/com/Upwork/api/Routers/MessagesTest.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ public class MessagesTest extends Helper {
2323
JSONObject json = messages.getRooms("company");
2424

2525
assertTrue(json instanceof JSONObject);
26+
27+
JSONObject json2 = messages.getRooms("company", new HashMap<String, String>());
28+
29+
assertTrue(json2 instanceof JSONObject);
2630
}
2731

2832
@Test public void getRoomDetails() throws Exception {

0 commit comments

Comments
 (0)