Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
34 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
package com.google.jplurk_oauth.module; | ||
|
||
import org.json.JSONObject; | ||
|
||
import com.google.jplurk_oauth.skeleton.AbstractModule; | ||
import com.google.jplurk_oauth.skeleton.Args; | ||
import com.google.jplurk_oauth.skeleton.HttpMethod; | ||
import com.google.jplurk_oauth.skeleton.RequestException; | ||
|
||
public class Profile extends AbstractModule { | ||
|
||
@Override | ||
protected String getModulePath() { | ||
return "/APP/Profile"; | ||
} | ||
|
||
public JSONObject getOwnProfile() throws RequestException { | ||
return requestBy("getOwnProfile").withoutArgs() | ||
.in(HttpMethod.GET).thenJsonObject(); | ||
} | ||
|
||
public JSONObject getPublicProfile(Long userId) throws RequestException { | ||
return requestBy("getPublicProfile") | ||
.with(new Args().add("user_id", userId)) | ||
.in(HttpMethod.GET).thenJsonObject(); | ||
} | ||
|
||
public JSONObject getPublicProfile(String userId) throws RequestException { | ||
return requestBy("getPublicProfile") | ||
.with(new Args().add("user_id", userId)) | ||
.in(HttpMethod.GET).thenJsonObject(); | ||
} | ||
|
||
} |