Python praw 模块,models() 实例源码

我们从Python开源项目中,提取了以下4个代码示例,用于说明如何使用praw.models()

项目:hearthscan-bot    作者:d-schmidt    | 项目源码 | 文件源码
def withCommentListener(self, commentListener):
        """Set a commentListener function. Comments will not be repeated.
        http://praw.readthedocs.io/en/latest/code_overview/models/comment.html

        :param commentListener: function(redditInstance, comment)
        :return: self
        """
        self.__commentListener = commentListener
        return self
项目:hearthscan-bot    作者:d-schmidt    | 项目源码 | 文件源码
def withSubmissionListener(self, submissionListener):
        """Set a submissionListener function. Submissions will not be repeated.
        http://praw.readthedocs.io/en/latest/code_overview/models/submission.html

        :param submissionListener: function(redditInstance, submission)
        :return: self
        """
        self.__submissionListener = submissionListener
        return self
项目:hearthscan-bot    作者:d-schmidt    | 项目源码 | 文件源码
def withMentionListener(self, commentListener):
        """Set a mentionListener function. Comments will not be repeated.
        http://praw.readthedocs.io/en/latest/code_overview/models/comment.html

        :param commentListener: function(redditInstance, comment)
        :return: self
        """
        self.__mentionListener = commentListener
        return self
项目:hearthscan-bot    作者:d-schmidt    | 项目源码 | 文件源码
def withPMListener(self, pmListener):
        """Set a pmListener function. PMs will not be repeated.
        http://praw.readthedocs.io/en/latest/code_overview/models/message.html

        :param pmListener: function(redditInstance, message)
        :return: self
        """
        self.__pmListener = pmListener
        return self