Skip to content

Commit

Permalink
Added javadoc for Profile.
Browse files Browse the repository at this point in the history
  • Loading branch information
askeing committed Mar 2, 2013
1 parent 723fc75 commit 9ad6a43
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions src/main/java/com/google/jplurk_oauth/module/Profile.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,37 @@ protected String getModulePath() {
return "/APP/Profile";
}

/**
* Returns data that's private for the current user.
* <p>This can be used to construct a profile and render a timeline of the latest plurks.</p>
* @return Returns a JSON object with a lot of information that can be used to construct a user's own profile and timeline.
* @throws RequestException
*/
public JSONObject getOwnProfile() throws RequestException {
return requestBy("getOwnProfile").withoutArgs()
.in(HttpMethod.GET).thenJsonObject();
}

/**
* Fetches public information such as a user's public plurks and basic information.
* <p>Fetches also if the current user is following the user, are friends with or is a fan.</p>
* @param userId The user_id of the public profile. Can be integer (like 34) or nick name (like amix).
* @return Returns a JSON object with a lot of information that can be used to construct a user's public profile and timeline.
* @throws RequestException
*/
public JSONObject getPublicProfile(Long userId) throws RequestException {
return requestBy("getPublicProfile")
.with(new Args().add("user_id", userId))
.in(HttpMethod.GET).thenJsonObject();
}

/**
* Fetches public information such as a user's public plurks and basic information.
* <p>Fetches also if the current user is following the user, are friends with or is a fan.</p>
* @param userId The user_id of the public profile. Can be integer (like 34) or nick name (like amix).
* @return Returns a JSON object with a lot of information that can be used to construct a user's public profile and timeline.
* @throws RequestException
*/
public JSONObject getPublicProfile(String userId) throws RequestException {
return requestBy("getPublicProfile")
.with(new Args().add("user_id", userId))
Expand Down

0 comments on commit 9ad6a43

Please sign in to comment.