Package com.github.jreddit.utils.restclient

Examples of com.github.jreddit.utils.restclient.RestClient


public class SubmissionsExample {

  public static void main(String[] args) {
   
    // Initialize REST Client
      RestClient restClient = new HttpRestClient();
      restClient.setUserAgent("bot/1.0 by name");

    // Connect the user
      User user = new User(restClient, Authentication.getUsername(), Authentication.getPassword());
    try {
      user.connect();
View Full Code Here


public class CommentsExample {

  public static void main(String[] args) {
   
    // Initialize REST Client
      RestClient restClient = new HttpRestClient();
      restClient.setUserAgent("bot/1.0 by name");

    // Connect the user
      User user = new User(restClient, Authentication.getUsername(), Authentication.getPassword());
    try {
      user.connect();
View Full Code Here

public class PostExample {

  public static void main(String[] args) {
   
    // Initialize REST Client
      RestClient restClient = new HttpRestClient();
      restClient.setUserAgent("bot/1.0 by name");

    // Connect the user
      User user = new User(restClient, Authentication.getUsername(), Authentication.getPassword());
    try {
      user.connect();
View Full Code Here

    public static final int NUMBER_OF_PAGES = 3;
    public static final String SUBREDDIT = "science";

    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++)
        {
View Full Code Here

*/
public class UpvoteExample {
 
  public static void main(String[] args) throws Exception {

        RestClient restClient = new HttpRestClient();
        restClient.setUserAgent("Generous-Bot");

    User user = new User(restClient, Authentication.getUsername(), Authentication.getPassword());
    user.connect();
   
    Submissions subms = new Submissions(restClient, user);
View Full Code Here

public class SubredditsExample {

  public static void main(String[] args) {
   
    // Initialize REST Client
      RestClient restClient = new HttpRestClient();
      restClient.setUserAgent("bot/1.0 by name");

    // Connect the user
      User user = new User(restClient, Authentication.getUsername(), Authentication.getPassword());
    try {
      user.connect();
View Full Code Here

TOP

Related Classes of com.github.jreddit.utils.restclient.RestClient

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.