Skip to content
This repository was archived by the owner on Oct 9, 2018. It is now read-only.

Commit afb9185

Browse files
author
Maksym Novozhylov
committed
version 0.1.10
1 parent 6b90515 commit afb9185

File tree

4 files changed

+23
-2
lines changed

4 files changed

+23
-2
lines changed

CHANGES.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# Release History
22

3+
## 0.1.10
4+
* Added new call for Referenced User API
5+
36
## 0.1.9
47
* Fixed issue #5 (encoding of post parameters)
58

doc/java-odesk-javadoc.zip

9 Bytes
Binary file not shown.

src/com/oDesk/api/Routers/Organization/Users.java

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
author = "Maksym Novozhylov <mnovozhilov@odesk.com>",
2727
date = "6/4/2014",
2828
currentRevision = 1,
29-
lastModified = "6/4/2014",
29+
lastModified = "10/13/2014",
3030
lastModifiedBy = "Maksym Novozhylov",
3131
reviewers = {"Yiota Tsakiri"}
3232
)
@@ -50,5 +50,16 @@ public Users(OAuthClient client) {
5050
public JSONObject getMyInfo() throws JSONException {
5151
return oClient.get("/hr/v2/users/me");
5252
}
53+
54+
/**
55+
* Get Specific User Info
56+
*
57+
* @param userReference User reference
58+
* @throws JSONException If error occurred
59+
* @return {@link JSONObject}
60+
*/
61+
public JSONObject getSpecific(String userReference) throws JSONException {
62+
return oClient.get("/hr/v2/users/me" + userReference);
63+
}
5364

5465
}

test/com/oDesk/api/Routers/Organization/UsersTest.java

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,11 @@ public class UsersTest extends Helper {
2222

2323
assertTrue(json instanceof JSONObject);
2424
}
25-
}
25+
26+
@Test public void getSpecific() throws Exception {
27+
Users users = new Users(client);
28+
JSONObject json = users.getSpecific("12");
29+
30+
assertTrue(json instanceof JSONObject);
31+
}
32+
}

0 commit comments

Comments
 (0)