public static void main(String[] args) throws Exception
{
RestClient restClient = PoliteRestClient.get();
restClient.setUserAgent("Post-Reader-Bot");
Submissions fetcher = new Submissions( restClient );
String after = null;
for (int page = 1; page <= NUMBER_OF_PAGES; page++)
{
PaginationResult<Submission> result = fetcher.getSubmissions(SUBREDDIT, after);
after = result.getAfter();
for ( Submission submission : result.getResults() )
{
System.out.println( submission.getTitle() + ", " + submission.getAuthor() );
}