Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  package com.github.jreddit.utils;


Some constants that are used for specifying Reddit API endpoints (example: /api/new_captcha)

Author(s):
Andrei Sfat
  
  public class ApiEndpointUtils {
 
     public static final String REDDIT_BASE_URL = "http://www.reddit.com";
 
     public static final String REDDIT_BASE_API_ENDPOINT = "/api";
 
     /* Captcha specific constants */
     
     public static final String CAPTCHA_NEW =  + "/new_captcha";
 
     public static final String CAPTCHA_NEEDS =  + "/needs_captcha.json";
     
     /* Message specific constants */
     
     public static final String MESSAGE_COMPOSE =  + "/compose";
     
     public static final String MESSAGE_READ =  + "/read_message";
 
     public static final String MESSAGE_GET = "/message/%s.json";
     
     public static final String BLOCK =  + "/block";
     
     /* API functions */
     
     public static final String COMMENT =  + "/comment";
     
     public static final String SUBMISSION_MARK_AS_NSFW =  + "/marknsfw";
     
     public static final String SUBMISSION_UNMARK_AS_NSFW =  + "/unmarknsfw";
     
     public static final String VOTE =  + "/vote";
 
     public static final String SAVE =  + "/save";
 
     public static final String UNSAVE =  + "/unsave";
     
     public static final String HIDE =  + "/hide";
     
     public static final String UNHIDE =  + "/unhide";
     
     public static final String DELETE =  + "/delete";
     
     public static final String REPORT =  + "/report";
 
     public static final String SUBMISSION_COMMENTS = "/comments/%s.json?%s";
     
     public static final String SUBMISSIONS_SEARCH = "/search.json?%s";
     
     public static final String SUBMISSIONS_GET = "/r/%s/%s.json?%s";
 
     /* Flair specific constants */
 
     public static final String USER_DELETE_SUBREDDIT_FLAIR = "/r/%s/api/deleteflair";
 
     public static final String CLEAR_SUBREDDIT_FLAIR_TEMPLATES = "/r/%s/api/clearflairtemplates";
 
     public static final String DELETE_SUBREDDIT_FLAIR_TEMPLATE = "/r/%s/api/deleteflairtemplate";
 
     public static final String FLAIR = "/r/%s/api/flair";
 
     public static final String FLAIR_CONFIG = "/r/%s/api/flairconfig";
 
     public static final String FLAIR_LIST = "/r/%s/api/flairlist";
 
     public static final String FLAIR_SELECTOR = "/r/%s/api/flairselector";
 
     public static final String FLAIR_TEMPLATE = "/r/%s/api/flairtemplate";
 
     public static final String SELECT_FLAIR = "/r/%s/api/selectflair";
 
     public static final String FLAIR_ENABLED = "/r/%s/api/setflairenabled";
     
     /* User specific constants */
     
     public static final String USER_LOGIN =  + "/login/%s";
     
     public static final String USER_SUBMIT =  + "/submit";
 
     public static final String USER_ABOUT = "/user/%s/about.json";
 
     public static final String USER_COMMENTS = "/user/%s/comments.json?%s";
 
     public static final String USER_GET_SUBSCRIBED = "/subreddits/mine/subscriber.json";
 
     public static final String USER_SUBMISSIONS_INTERACTION = "/user/%s/%s.json?%s";
 
     public static final String USER_SUBMISSIONS = "/user/%s/submitted.json";
 
     public static final String USER_INFO =  + "/me.json";
     
     public static final String USER_UPDATE =  + "/update";
    public static final String USER_DELETE =  + "/delete_user";
    
    public static final String USER_REGISTER =  + "/register";
    /* Subreddits specific constants */
    public static final String SUBREDDITS = "/subreddits.json";
    public static final String SUBREDDITS_GET = "/subreddits/%s.json?%s";
    
    public static final String SUBREDDITS_SEARCH = "/subreddits/search.json?%s";
New to GrepCode? Check out our FAQ X