Package com.github.jreddit.action

Examples of com.github.jreddit.action.MarkActions


    User user = new User(restClient, Authentication.getUsername(), Authentication.getPassword());
    user.connect();
   
    Submissions subms = new Submissions(restClient, user);
    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.");
        }
      }
   
    } catch (RetrievalFailedException e) {
View Full Code Here

TOP

Related Classes of com.github.jreddit.action.MarkActions

Copyright © 2018 www.massapicom. 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.