MobileBlur

stories.py at [6d9fde817c]
Login

stories.py at [6d9fde817c]

File applications/mobileblur/controllers/stories.py artifact fbf9de8ba7 part of check-in 6d9fde817c


# -*- coding: utf-8 -*-

from pprint import pprint

def view():
    stories = newsblur.feed(request.vars["feed_id"])["stories"]
    story = [story for story in stories if story["id"]==request.vars["story"]][0]
    return dict(story=story, feed_id=request.vars["feed_id"])

def mark_read():
    results = newsblur.mark_story_as_read(request.vars["story_id"], request.vars["feed_id"])
    redirect(URL("default", "index"))