plugin.py 文件源码

python
阅读 22 收藏 0 点赞 0 评论 0

项目:globibot 作者: best-coloc-ever 项目源码 文件源码
def load(self):
        self.oauth = OAuth(
            self.config.get(c.ACCESS_TOKEN_KEY),
            self.config.get(c.ACCESS_TOKEN_SECRET_KEY),
            self.config.get(c.CONSUMER_KEY_KEY),
            self.config.get(c.CONSUMER_SECRET_KEY),
        )

        self.client = TwitterAPI(auth=self.oauth)

        context = dict(plugin=self, bot=self.bot)
        self.add_web_handlers(
            (r'/twitter/oauth_token', OAuthTokenHandler, context),
            (r'/twitter/authorize', OAuthAuthorizeHandler, context),
            (r'/twitter/status', TwitterStatusHandler, context),
            (r'/twitter/disconnect', TwitterDisconnectHandler, context),
        )

        self.monitored = set()
        self.restore_monitored()

        self.request_tokens = dict()
        self.last_tweets = dict()

        self.interactive_tweets = dict()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号