Skip to content

Instantly share code, notes, and snippets.

@spladug
Created January 31, 2012 17:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save spladug/1711628 to your computer and use it in GitHub Desktop.
Save spladug/1711628 to your computer and use it in GitHub Desktop.
precomputed queries
### Following are all the precomputed queries in reddit including
### those from queries.py and promote.py. user/author_id is an account
### sr is a subreddit, sort is one of ("hot", "new", "top", "controversial")
### and time is one of ("all", "hour", "day", "week", "month", "year").
### I've divided them into two rough groupings: user and subreddit.
def get_links(sr, sort, time):
def get_spam_links(sr):
def get_spam_comments(sr):
def get_reported_links(sr):
def get_reported_comments(sr):
def get_sr_comments(sr):
def get_subreddit_messages(sr):
def get_unread_subreddit_messages(sr):
def get_liked(user):
def get_disliked(user):
def get_hidden(user):
def get_saved(user_id):
def get_submitted(user, sort, time):
def get_comments(user, sort, time):
def get_inbox_messages(user):
def get_unread_messages(user):
def get_inbox_comments(user):
def get_unread_comments(user):
def get_inbox_selfreply(user):
def get_unread_selfreply(user):
def get_sent(user):
def get_unpaid_links(author_id):
def get_unapproved_links(author_id):
def get_rejected_links(author_id):
def get_live_links(author_id):
def get_all_links(author_id):
def get_all_comments():
def get_domain_links(domain, sort, time):
### The following queries, divided into user and subreddit groupings,
### are simply mergers of the queries above and so require no storage
### of their own in Cassandra.
def get_modqueue(sr):
def get_reported(sr):
def get_trials(sr):
def get_spam(sr):
def get_overview(user, sort, time):
def get_inbox(user):
def get_unread_inbox(user):
def get_accepted_links(author_id):
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment