Пример #1
0
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
        )
Пример #2
0
def get_story(story_id):
    return Story.get(story_id)