From 3369df5a31d48149ce5c677796ecf3f569458f50 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=87=91=E5=96=9C=40DingTalk?= Date: Mon, 4 Sep 2023 17:22:00 +0800 Subject: [PATCH] release v0.13.0 (#17) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fix: 修复拼写错误:register_callback_hanlder => register_callback_handler Signed-off-by: Ke Jie --- dingtalk_stream/stream.py | 2 +- dingtalk_stream/version.py | 2 +- examples/calcbot/calcbot.py | 2 +- examples/cardbot/cardbot.py | 2 +- examples/cardcallback/cardcallback.py | 2 +- examples/helloworld/helloworld.py | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/dingtalk_stream/stream.py b/dingtalk_stream/stream.py index c106eb8..81dd379 100644 --- a/dingtalk_stream/stream.py +++ b/dingtalk_stream/stream.py @@ -46,7 +46,7 @@ def register_all_event_handler(self, handler: EventHandler): self.event_handler = handler self._is_event_required = True - def register_callback_hanlder(self, topic, handler: CallbackHandler): + def register_callback_handler(self, topic, handler: CallbackHandler): handler.dingtalk_client = self self.callback_handler_map[topic] = handler diff --git a/dingtalk_stream/version.py b/dingtalk_stream/version.py index 3cf5404..7bd99ab 100644 --- a/dingtalk_stream/version.py +++ b/dingtalk_stream/version.py @@ -1 +1 @@ -VERSION_STRING = '0.12.0' +VERSION_STRING = '0.13.0' diff --git a/examples/calcbot/calcbot.py b/examples/calcbot/calcbot.py index bf857bb..af7b4f6 100644 --- a/examples/calcbot/calcbot.py +++ b/examples/calcbot/calcbot.py @@ -54,7 +54,7 @@ def main(): credential = dingtalk_stream.Credential(options.client_id, options.client_secret) client = dingtalk_stream.DingTalkStreamClient(credential) - client.register_callback_hanlder(dingtalk_stream.chatbot.ChatbotMessage.TOPIC, CalcBotHandler(logger)) + client.register_callback_handler(dingtalk_stream.chatbot.ChatbotMessage.TOPIC, CalcBotHandler(logger)) client.start_forever() diff --git a/examples/cardbot/cardbot.py b/examples/cardbot/cardbot.py index b8afe1e..ad72584 100644 --- a/examples/cardbot/cardbot.py +++ b/examples/cardbot/cardbot.py @@ -71,7 +71,7 @@ def main(): card_bot_handler = CardBotHandler(logger) - client.register_callback_hanlder(dingtalk_stream.chatbot.ChatbotMessage.TOPIC, card_bot_handler) + client.register_callback_handler(dingtalk_stream.chatbot.ChatbotMessage.TOPIC, card_bot_handler) card_bot_handler.set_off_duty_prompt("不好意思,我已下班,请稍后联系我!") diff --git a/examples/cardcallback/cardcallback.py b/examples/cardcallback/cardcallback.py index a0ae6ac..b6607ed 100644 --- a/examples/cardcallback/cardcallback.py +++ b/examples/cardcallback/cardcallback.py @@ -61,7 +61,7 @@ def main(): credential = dingtalk_stream.Credential(options.client_id, options.client_secret) client = dingtalk_stream.DingTalkStreamClient(credential) - client.register_callback_hanlder(dingtalk_stream.CallbackHandler.TOPIC_CARD_CALLBACK, + client.register_callback_handler(dingtalk_stream.CallbackHandler.TOPIC_CARD_CALLBACK, CardCallbackHandler(logger)) client.start_forever() diff --git a/examples/helloworld/helloworld.py b/examples/helloworld/helloworld.py index 2e813c0..7e76538 100644 --- a/examples/helloworld/helloworld.py +++ b/examples/helloworld/helloworld.py @@ -41,7 +41,7 @@ def main(): credential = dingtalk_stream.Credential(options.client_id, options.client_secret) client = dingtalk_stream.DingTalkStreamClient(credential) client.register_all_event_handler(MyEventHandler()) - client.register_callback_hanlder(dingtalk_stream.ChatbotMessage.TOPIC, MyCallbackHandler()) + client.register_callback_handler(dingtalk_stream.ChatbotMessage.TOPIC, MyCallbackHandler()) client.start_forever()