1 """ Wrappers for the results of a search """
3 class PodcastResult(object):
4 """ Wrapper for a Podcast search result """
7 def from_doc(cls
, doc
):
8 """ Construct a PodcastResult from a search result """
11 for key
, val
in doc
['_source'].items():
12 setattr(obj
, key
, val
)
19 return next(iter(self
.slugs
), None)
23 return next(iter(self
.urls
), None)