示例#1
0
    def comments(self):
        """All comments (shouts and reviews) for this :class:`TVEpisode`. Most
        recent comments returned first.
        """
        # TODO (jnappi) Pagination
        from .users import User

        data = yield (self.ext + '/comments')
        self._comments = []
        for com in data:
            user = User(**com.pop('user'))
            self._comments.append(Comment(user=user, **com))
        yield self._comments
示例#2
0
 def comments(self):
     """All comments (shouts and reviews) for this :class:`Movie`. Most
     recent comments returned first.
     """
     # TODO (jnappi) Pagination
     from trakt.users import User
     data = yield (self.ext + '/comments')
     self._comments = []
     for com in data:
         user = User(**com.get('user'))
         self._comments.append(
             Comment(user=user, **{k: com[k] for k in com if k != 'user'})
         )
     yield self._comments