An easy to use & straightforward API Wrapper for the Random Stuff API.
- AiResponse
- Animal Images
- Anime Image Search
- Jokes
- Weather
<dependencies>
<dependency>
<groupId>io.github.rushaan1</groupId>
<artifactId>RandomStuff4J</artifactId>
<version>1.1</version>
</dependency>
</dependencies>
AiResponseClient client = new AiResponseClient("Authorization_Key","Rapid_Api_Key");
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
while (true){
String message = reader.readLine();
if (Objects.equals(message.toLowerCase(), "stop")) {
break;
}
System.out.println(client.getResponse(message));
}
The above example is actually a mini console chatbot!
AnimalsClient client = new AnimalsClient("Authorization_Key","Rapid_Api_Key");
String[] imageLink = client.getImage("dog",5);
for (String i : imageLink){
System.out.println(i);
}
The above example will give 5 links for images of dogs!