Skip to content
This repository was archived by the owner on Jan 5, 2019. It is now read-only.

Commit aa614e5

Browse files
committed
Add rant posting
1 parent 5230de2 commit aa614e5

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

src/main/java/com/scorpiac/javarant/DevRant.java

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -289,6 +289,20 @@ public boolean voteComment(int id, Vote vote) {
289289
return Util.jsonSuccess(post(url, new BasicNameValuePair("vote", String.valueOf(vote.getValue()))));
290290
}
291291

292+
/**
293+
* Post a rant.
294+
*
295+
* @param rant The content of the rant.
296+
* @param tags The tags.
297+
* @return Whether posting the rant was successful.
298+
*/
299+
public boolean postRant(String rant, String tags) {
300+
return Util.jsonSuccess(post(API_RANTS,
301+
new BasicNameValuePair("rant", rant),
302+
new BasicNameValuePair("tags", tags)
303+
));
304+
}
305+
292306
/**
293307
* Make a POST-request to the devRant server.
294308
*

0 commit comments

Comments
 (0)