Permalink
Browse files

Add explict listing selectors and use account default for non-explici…

…t selectors
  • Loading branch information...
1 parent b08363f commit 447116bd25ae4404b1b5085e6f1d0a82ac2f0082 @bboe bboe committed Jun 25, 2012
Showing with 21 additions and 5 deletions.
  1. +1 −1 reddit/__init__.py
  2. +20 −4 reddit/objects.py
View
@@ -30,7 +30,7 @@
import reddit.objects
from reddit.settings import CONFIG
-__version__ = '1.3.11'
+__version__ = '1.4.0'
UA_STRING = '%%s PRAW/%s Python/%s %s' % (__version__,
sys.version.split()[0],
platform.platform(True))
View
@@ -628,12 +628,28 @@ class Subreddit(Messageable):
remove_moderator = _modify_relationship('moderator', unlink=True,
is_sub=True)
+ # Generic listing selectors
+ get_comments = _get_section('comments')
+ get_controversial = _get_sorter('controversial')
get_hot = _get_sorter('')
- get_controversial = _get_sorter('controversial', t='day')
- get_new = _get_sorter('new', sort='rising')
- get_top = _get_sorter('top', t='day')
+ get_new = _get_sorter('new')
+ get_top = _get_sorter('top')
+
+ # Explicit listing selectors
+ get_controversial_from_all = _get_sorter('controversial', t='all')
+ get_controversial_from_day = _get_sorter('controversial', t='day')
+ get_controversial_from_hour = _get_sorter('controversial', t='hour')
+ get_controversial_from_month = _get_sorter('controversial', t='month')
+ get_controversial_from_week = _get_sorter('controversial', t='week')
+ get_controversial_from_year = _get_sorter('controversial', t='year')
get_new_by_date = _get_sorter('new', sort='new')
- get_comments = _get_section('comments')
+ get_new_by_rising = _get_sorter('new', sort='rising')
+ get_top_from_all = _get_sorter('top', t='all')
+ get_top_from_day = _get_sorter('top', t='day')
+ get_top_from_hour = _get_sorter('top', t='hour')
+ get_top_from_month = _get_sorter('top', t='month')
+ get_top_from_week = _get_sorter('top', t='week')
+ get_top_from_year = _get_sorter('top', t='year')
def __init__(self, reddit_session, subreddit_name=None, json_dict=None,
fetch=False):

0 comments on commit 447116b

Please sign in to comment.