Skip to content

Commit

Permalink
release v0.13.0 (#17)
Browse files Browse the repository at this point in the history
fix: 修复拼写错误:register_callback_hanlder => register_callback_handler

Signed-off-by: Ke Jie <[email protected]>
  • Loading branch information
chzealot authored Sep 4, 2023
1 parent 31e8560 commit 3369df5
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion dingtalk_stream/stream.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion dingtalk_stream/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
VERSION_STRING = '0.12.0'
VERSION_STRING = '0.13.0'
2 changes: 1 addition & 1 deletion examples/calcbot/calcbot.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()


Expand Down
2 changes: 1 addition & 1 deletion examples/cardbot/cardbot.py
Original file line number Diff line number Diff line change
Expand Up @@ -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("不好意思,我已下班,请稍后联系我!")

Expand Down
2 changes: 1 addition & 1 deletion examples/cardcallback/cardcallback.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down
2 changes: 1 addition & 1 deletion examples/helloworld/helloworld.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()


Expand Down

0 comments on commit 3369df5

Please sign in to comment.