mirror of
https://github.com/bspeice/elektricity
synced 2024-11-12 12:58:10 -05:00
17 lines
506 B
Python
17 lines
506 B
Python
"""
|
|
Base skeleton for what needs to be implemented by a podcast provider
|
|
"""
|
|
from feedgen.feed import FeedGenerator
|
|
from pyramid.response import Response
|
|
|
|
class BasePodcast():
|
|
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
|