view FeedEntry.py @ 4:e0199f383442

retrieve a feed for the given URL, store entries as feed_entry rows into the database
author Dirk Olmes <dirk@xanthippe.ping.de>
date Mon, 26 Apr 2010 19:33:07 +0200
parents
children bfd47f55d85b
line wrap: on
line source


class FeedEntry(object):
    @staticmethod
    def findById(id, session):
        result = session.query(FeedEntry).filter(FeedEntry.id == id)
        return result.first()

    def __init__(self, id, url, title, summary):
        self.id = id
        self.url = url
        self.title = title
        self.summary = summary

    def __repr__(self):
        return "<FeedEntry (%d) %s>" % (self.pk, self.link)