Original Intention
In these days, some developers try to add more abilities to bot, eg: saving chat history, enable restapi in python-wechaty bot and sync the messages between specific rooms. The first one has been accompished, So I wanna to get second done in next days.
What does RESTFUL API look like ?
talk is cheap, show the mvp code.
from wechaty import Wechaty, WechatyPlugin
class Bot(Wechaty):
async def register_blueprints(self, app):
@app.route('/hello-bot')
async def say_hello():
pass
class MessagePlugin(WechatyPlugin):
async def register_blueprints(self, app):
@app.route('/send-message-to-my-baby')
async def say_morning():
pass
Once you register your blueprint to app, swagger-doc will be generated by default. Above code is simple but powerful. Do you think so ?
Web Frameworks
There are some great async-based web frameworks, and I will choose the popular & fast one in the design. Please give yourself suggestion: What do you choose ? and Why do you choose it ?
Frameworks:
Original Intention
In these days, some developers try to add more abilities to bot, eg: saving chat history, enable restapi in python-wechaty bot and sync the messages between specific rooms. The first one has been accompished, So I wanna to get second done in next days.
What does RESTFUL API look like ?
talk is cheap, show the mvp code.
Once you register your blueprint to app, swagger-doc will be generated by default. Above code is simple but powerful. Do you think so ?
Web Frameworks
There are some great async-based web frameworks, and I will choose the popular & fast one in the design. Please give yourself suggestion: What do you choose ? and Why do you choose it ?
Frameworks: