def get_stories(): subreddit = request.args.get('subreddit', 'aww') limit = int(request.args.get('limit', 25)) before = request.args.get('before') return Story.find( subreddit=subreddit, limit=limit, before=before )
def get_story(story_id): return Story.get(story_id)