1 """ Wrappers for the results of a search """
6 class PodcastResult(object):
7 """ Wrapper for a Podcast search result """
10 def from_doc(cls
, doc
):
11 """ Construct a PodcastResult from a search result """
14 for key
, val
in doc
['_source'].items():
15 setattr(obj
, key
, val
)
17 obj
.id = uuid
.UUID(doc
['_id']).hex
22 return next(iter(self
.slugs
), None)
26 return next(iter(self
.urls
), None)
32 def display_title(self
):