2016-05-06 23:20:59 -04:00
|
|
|
"""
|
|
|
|
Base skeleton for what needs to be implemented by a podcast provider
|
|
|
|
"""
|
|
|
|
from feedgen.feed import FeedGenerator
|
|
|
|
from pyramid.response import Response
|
|
|
|
|
2016-05-07 11:09:55 -04:00
|
|
|
|
2016-05-06 23:20:59 -04:00
|
|
|
class BasePodcast():
|
2016-05-07 11:09:55 -04:00
|
|
|
|
2016-05-06 23:20:59 -04:00
|
|
|
def build_feed(self) -> FeedGenerator:
|
|
|
|
"Return a list of all episodes, in descending date order"
|
|
|
|
pass
|
|
|
|
|
|
|
|
def view(self, request):
|
|
|
|
fg = self.build_feed()
|
|
|
|
response = Response(fg.rss_str(pretty=True))
|
|
|
|
response.content_type = 'application/rss+xml'
|
|
|
|
return response
|