HabitRPG Java Client is very simple to use!
First, you have to create a client with your own key:
AuthenticationInformations authenticationInformations = new AuthenticationInformations("3de939f9-b0c0-4668-ac2c-f5a02abfe6aa", "56dbdfdd-a161-412d-a575-1050639ce8e7");
HabitRpgClient client = new HabitRpgClient(new URL("https://habitrpg.com"), authenticationInformations);
Then, you can call multiple operations to interact with your HabitRPG account.
User user = client.getUser();
Task task = client.createTask(new Task("from the api!", Task.Type.todo));
Collection<Task> tasks = client.getTasks();
Collection<Task> tasks = client.getTasks(Task.Type.todo);
Task task = client.getTask("bc8b6db0-2605-4943-bf18-114f628bb287");
Task task = client.updateTask("bc8b6db0-2605-4943-bf18-114f628bb287", new Task("from the api! EDITED", Task.Type.daily, 2, "notes EDITED", Task.Status.INCOMPLETE, Task.Direction.up));
client.deleteTask("bc8b6db0-2605-4943-bf18-114f628bb287");