/***************************************************************************************************
* Second: extended API functionality
*/
// Handle to ExtendedComments, which offers functionality beyond the Reddit API
ExtendedComments extendedComs = new ExtendedComments(coms);
// Retrieve the top 50 first level comments, and all their (up to 500) subcomments each
System.out.println("\n============== Extended submission comments retrieval ==============");
List<Comment> commentsSubmissionExtra = extendedComs.ofSubmission("2911vg", CommentSort.TOP, 50, null);
Comments.printCommentTree(commentsSubmissionExtra);
// Retrieve all comments that are possible to retrieve from a user (there is a limit in Reddit which only
// allows you to retrieve about ~1000 posts in a listing, e.g. a subreddit or user posts listing)
System.out.println("\n============== Extended user comments retrieval ==============");
List<Comment> commentsUserExtra = extendedComs.ofUser("Unidan", UserOverviewSort.HOT, TimeSpan.ALL, RedditConstants.APPROXIMATE_MAX_LISTING_AMOUNT, null);
Comments.printCommentTree(commentsUserExtra);
} catch (RetrievalFailedException e) {
e.printStackTrace();
} catch (RedditError e) {