Examples of ofSubreddit()


Examples of com.github.jreddit.retrieval.ExtendedSubmissions.ofSubreddit()

      // Handle to ExtendedSubmissions, which offers functionality beyond the Reddit API
      ExtendedSubmissions extendedSubms = new ExtendedSubmissions(subms);
     
      // Retrieve the top 323 submissions of funny
      System.out.println("\n============== Extended subreddits submissions retrieval ==============");
      List<Submission> submissionsSubredditExtra = extendedSubms.ofSubreddit("funny", SubmissionSort.TOP, 323, null);
      printSubmissionsList(submissionsSubredditExtra);
 
      // Retrieve the top 532 submissions of query "valentine", user is not given (which is optional)
      System.out.println("\n============== Extended search submissions retrieval ==============");
      List<Submission> submissionsSearchExtra = extendedSubms.search("valentine", SearchSort.RELEVANCE, TimeSpan.ALL, 532);
View Full Code Here

Examples of com.github.jreddit.retrieval.Submissions.ofSubreddit()

      // Handle to Submissions, which offers the basic API functionality
      Submissions subms = new Submissions(restClient, user);
     
      // Retrieve submissions of a submission
      System.out.println("\n============== Basic subreddit submissions ==============");
      List<Submission> submissionsSubreddit = subms.ofSubreddit("flowers", SubmissionSort.TOP, -1, 100, null, null, true);
      printSubmissionsList(submissionsSubreddit);
     
      // Search for submissions
      System.out.println("\n============== Basic search submissions ==============");
      List<Submission> submissionsSearch = subms.search("flowers", null, null, TimeSpan.MONTH, -1, 100, null, null, true);
View Full Code Here

Examples of com.github.jreddit.retrieval.Submissions.ofSubreddit()

    MarkActions submAct = new MarkActions(restClient, user);
   
    try {
     
      // Retrieve the 25 hottest submissions of the subreddit
      List<Submission> submissions = subms.ofSubreddit("programming", SubmissionSort.HOT, 0, 25, null, null, true);

      // Upvote each submission
      for (Submission submission : submissions) {
        if (!submAct.vote(submission.getFullName(), 1)) {
          System.out.println("Could not upvote.");
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.