/***************************************************************************************************
* First: basic API functionality
*/
// Handle to Comments, which offers the basic API functionality
Comments coms = new Comments(restClient, user);
// Retrieve comments of a submission
System.out.println("\n============== Basic submission comments ==============");
List<Comment> commentsSubmission = coms.ofSubmission("29p8fe", null, 0, 8, 100, CommentSort.TOP);
Comments.printCommentTree(commentsSubmission);
// Retrieve comments of a user
System.out.println("\n============== Basic user comments ==============");
List<Comment> commentsUser = coms.ofUser("Unidan", UserOverviewSort.NEW, TimeSpan.ALL, -1, 80, null, null, true);
Comments.printCommentTree(commentsUser); // Note: this tree is already flat, because listing is one level
/***************************************************************************************************
* Second: extended API functionality