Mercurial > hg > Feedworm
diff 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 diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/FeedEntry.py Mon Apr 26 19:33:07 2010 +0200 @@ -0,0 +1,15 @@ + +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)