JavaRant
A devRant API wrapper for Java.
Install / Use
/learn @LucaScorpion/JavaRantREADME
JavaRant
A devRant API wrapper for Java.
Maven
JavaRant is available on Maven, simply add this dependency to your pom.xml file:
<dependency>
<groupId>com.scorpiac.javarant</groupId>
<artifactId>javarant</artifactId>
<version>2.1.0</version>
</dependency>
Using JavaRant
To access devRant simply create a new DevRant object:
DevRant devRant = new DevRant();
The DevRant class itself can be used to get specific rants and users.
// Get a specific rant.
CommentedRant rant = devRant.getRant(686001);
// Get a user by username.
User me = devRant.getUser("LucaScorpion");
The DevRant class contains 2 methods for getting to specific parts of the api.
First, getFeed() which returns a DevRantFeed object.
This is used to access the rant and collab feeds.
// Get the 10 latest rants.
List<Rant> recent = devRant.getFeed().getRants(Sort.RECENT, 10, 0);
// Get the 10 best stories.
List<Rant> stories = devRant.getFeed().getStories(Sort.TOP, 0);
// Get 10 collabs.
List<Collab> collabs = devRant.getFeed().getCollabs(10);
Second, getAuth() which returns a DevRantAuth object, which is used to access user functionality.
Note that a user needs to be logged in before this can be accessed.
// Log in to devRant.
char[] password = "<password>".toCharArray();
devRant.login("<username>", password);
// Upvote a rant.
devRant.getAuth().voteRant(832125, Vote.UP);
// Clear the vote on a comment.
devRant.getAuth().voteComment(832169, Vote.NONE);
// Log out to clear the token.
devRant.logout();
Related Skills
node-connect
344.1kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
96.8kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
344.1kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
344.1kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
