diff --git a/clients/http/wcfhttp/main.py b/clients/http/wcfhttp/main.py index 732d648..99e7fab 100644 --- a/clients/http/wcfhttp/main.py +++ b/clients/http/wcfhttp/main.py @@ -28,10 +28,24 @@ def main(): wcf = Wcf(args.wcf_host, args.wcf_port, args.wcf_debug) home = "https://github.com/lich0821/WeChatFerry" + qrcodes = """ + + + + + + + + + + + + +
碲矿赞赏
后台回复 WeChatFerry 加群交流如果你觉得有用
""" http = Http(wcf=wcf, cb=cb, title="WeChatFerry HTTP 客户端", - description=f"Github: WeChatFerry",) + description=f"Github: WeChatFerry{qrcodes}",) uvicorn.run(app=http, host=args.host, port=args.port) diff --git a/clients/python/wcferry/client.py b/clients/python/wcferry/client.py index 17a8199..5ef85b4 100644 --- a/clients/python/wcferry/client.py +++ b/clients/python/wcferry/client.py @@ -234,7 +234,7 @@ class Wcf(): """发送文本消息 Args: - msg (str): 要发送的消息,换行使用 `\\n`;如果 @ 人的话,需要带上跟 `aters` 里数量相同的 @ + msg (str): 要发送的消息,换行使用 `\\\\n` (单杠);如果 @ 人的话,需要带上跟 `aters` 里数量相同的 @ receiver (str): 消息接收人,wxid 或者 roomid aters (str): 要 @ 的 wxid,多个用逗号分隔;`@所有人` 只需要 `notify@all` diff --git a/docs/source/_static/openapi-wcfhttp.json b/docs/source/_static/openapi-wcfhttp.json index 495fa74..861e097 100644 --- a/docs/source/_static/openapi-wcfhttp.json +++ b/docs/source/_static/openapi-wcfhttp.json @@ -1 +1 @@ -{"openapi":"3.1.0","info":{"title":"WeChatFerry HTTP 客户端","description":"Github: WeChatFerry","version":"0.1.0"},"paths":{"/msg_cb":{"post":{"tags":["示例"],"summary":"接收消息回调样例","description":"示例回调方法,简单打印消息","operationId":"msg_cb_msg_cb_post","requestBody":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Msg"}],"title":"Msg","description":"微信消息"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/login":{"get":{"summary":"获取登录状态","description":"获取登录状态","operationId":"is_login_login_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Is Login Login Get"}}}}}}},"/wxid":{"get":{"summary":"获取登录账号 wxid","description":"获取登录账号 wxid","operationId":"get_self_wxid_wxid_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Get Self Wxid Wxid Get"}}}}}}},"/user-info":{"get":{"summary":"获取登录账号个人信息","description":"获取登录账号个人信息","operationId":"get_user_info_user_info_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Get User Info User Info Get"}}}}}}},"/msg-types":{"get":{"summary":"获取消息类型","description":"获取消息类型","operationId":"get_msg_types_msg_types_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Get Msg Types Msg Types Get"}}}}}}},"/contacts":{"get":{"summary":"获取完整通讯录","description":"获取完整通讯录","operationId":"get_contacts_contacts_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Get Contacts Contacts Get"}}}}}}},"/friends":{"get":{"summary":"获取好友列表","description":"获取好友列表","operationId":"get_friends_friends_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Get Friends Friends Get"}}}}}}},"/dbs":{"get":{"summary":"获取所有数据库","description":"获取所有数据库","operationId":"get_dbs_dbs_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Get Dbs Dbs Get"}}}}}}},"/{db}/tables":{"get":{"summary":"获取 db 中所有表","description":"获取 db 中所有表\n\nArgs:\n db (str): 数据库名(可通过 `get_dbs` 查询)\n\nReturns:\n List[dict]: `db` 下的所有表名及对应建表语句","operationId":"get_tables__db__tables_get","parameters":[{"name":"db","in":"path","required":true,"schema":{"type":"string","title":"Db"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Get Tables Db Tables Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/text":{"post":{"summary":"发送文本消息","description":"发送文本消息,可参考:https://github.com/lich0821/WeChatRobot/blob/master/robot.py 里 sendTextMsg\n\nArgs:\n msg (str): 要发送的消息,换行使用 `\\\\n`;如果 @ 人的话,需要带上跟 `aters` 里数量相同的 @\n receiver (str): 消息接收人,wxid 或者 roomid\n aters (str): 要 @ 的 wxid,多个用逗号分隔;`@所有人` 只需要 `notify@all`\n\nReturns:\n int: 0 为成功,其他失败","operationId":"send_text_text_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_send_text_text_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Send Text Text Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/image":{"post":{"summary":"发送图片消息","description":"发送图片,非线程安全\n\nArgs:\n path (str): 图片路径,如:`C:/Projs/WeChatRobot/TEQuant.jpeg` 或 `https://raw.githubusercontent.com/lich0821/WeChatRobot/master/TEQuant.jpeg`\n receiver (str): 消息接收人,wxid 或者 roomid\n\nReturns:\n int: 0 为成功,其他失败","operationId":"send_image_image_post","requestBody":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Body_send_image_image_post"}],"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Send Image Image Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/file":{"post":{"summary":"发送文件消息","description":"发送文件\n\nArgs:\n path (str): 本地文件路径,如:`C:/Projs/WeChatRobot/README.MD`\n receiver (str): 消息接收人,wxid 或者 roomid\n\nReturns:\n int: 0 为成功,其他失败","operationId":"send_file_file_post","requestBody":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Body_send_file_file_post"}],"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Send File File Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/sql":{"post":{"summary":"执行 SQL,如果数据量大注意分页,以免 OOM","description":"执行 SQL,如果数据量大注意分页,以免 OOM\n\nArgs:\n db (str): 要查询的数据库\n sql (str): 要执行的 SQL\n\nReturns:\n List[dict]: 查询结果","operationId":"query_sql_sql_post","requestBody":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Body_query_sql_sql_post"}],"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Query Sql Sql Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/new-friend":{"post":{"summary":"通过好友申请","description":"通过好友申请\n\nArgs:\n v3 (str): 加密用户名 (好友申请消息里 v3 开头的字符串)\n v4 (str): Ticket (好友申请消息里 v4 开头的字符串)\n scene: 申请方式 (好友申请消息里的 scene)\n\nReturns:\n int: 1 为成功,其他失败","operationId":"accept_new_friend_new_friend_post","requestBody":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Body_accept_new_friend_new_friend_post"}],"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Accept New Friend New Friend Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/chatroom-member":{"post":{"summary":"添加群成员","description":"添加群成员\n\nArgs:\n roomid (str): 待加群的 id\n wxids (str): 要加到群里的 wxid,多个用逗号分隔\n\nReturns:\n int: 1 为成功,其他失败","operationId":"add_chatroom_members_chatroom_member_post","requestBody":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Body_add_chatroom_members_chatroom_member_post"}],"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Add Chatroom Members Chatroom Member Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"summary":"删除群成员","description":"删除群成员\n\nArgs:\n roomid (str): 群的 id\n wxids (str): 要删除的 wxid,多个用逗号分隔\n\nReturns:\n int: 1 为成功,其他失败","operationId":"del_chatroom_members_chatroom_member_delete","requestBody":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Body_del_chatroom_members_chatroom_member_delete"}],"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Del Chatroom Members Chatroom Member Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/transfer":{"post":{"summary":"接收转账","description":"接收转账\n\nArgs:\n wxid (str): 转账消息里的发送人 wxid\n transferid (str): 转账消息里的 transferid\n transactionid (str): 转账消息里的 transactionid\n\nReturns:\n int: 1 为成功,其他失败","operationId":"receive_transfer_transfer_post","requestBody":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Body_receive_transfer_transfer_post"}],"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Receive Transfer Transfer Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/dec-image":{"post":{"summary":"解密图片","description":"解密图片:\n\nArgs:\n src (str): 加密的图片路径\n dst (str): 解密的图片路径\n\nReturns:\n bool: 是否成功","operationId":"decrypt_image_dec_image_post","requestBody":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Body_decrypt_image_dec_image_post"}],"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Decrypt Image Dec Image Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"Body_accept_new_friend_new_friend_post":{"properties":{"v3":{"type":"string","title":"V3","description":"加密用户名 (好友申请消息里 v3 开头的字符串)","default":"v3"},"v4":{"type":"string","title":"V4","description":"Ticket (好友申请消息里 v4 开头的字符串)","default":"v4"},"scene":{"type":"integer","title":"Scene","description":"申请方式 (好友申请消息里的 scene)","default":30}},"type":"object","title":"Body_accept_new_friend_new_friend_post"},"Body_add_chatroom_members_chatroom_member_post":{"properties":{"roomid":{"type":"string","title":"Roomid","description":"待加群的 id","default":"xxxxxxxx@chatroom"},"wxids":{"type":"string","title":"Wxids","description":"要加到群里的 wxid,多个用逗号分隔","default":"wxid_xxxxxxxxxxxxx"}},"type":"object","title":"Body_add_chatroom_members_chatroom_member_post"},"Body_decrypt_image_dec_image_post":{"properties":{"src":{"type":"string","title":"Src","description":"加密的图片路径,从图片消息中获取","default":"C:\\..."},"dst":{"type":"string","title":"Dst","description":"解密的图片路径","default":"C:\\..."}},"type":"object","title":"Body_decrypt_image_dec_image_post"},"Body_del_chatroom_members_chatroom_member_delete":{"properties":{"roomid":{"type":"string","title":"Roomid","description":"群的 id","default":"xxxxxxxx@chatroom"},"wxids":{"type":"string","title":"Wxids","description":"要删除的 wxid,多个用逗号分隔","default":"wxid_xxxxxxxxxxxxx"}},"type":"object","title":"Body_del_chatroom_members_chatroom_member_delete"},"Body_query_sql_sql_post":{"properties":{"db":{"type":"string","title":"Db","description":"数据库","default":"MicroMsg.db"},"sql":{"type":"string","title":"Sql","description":"SQL 语句","default":"SELECT * FROM Contact LIMIT 1;"}},"type":"object","title":"Body_query_sql_sql_post"},"Body_receive_transfer_transfer_post":{"properties":{"wxid":{"type":"string","title":"Wxid","description":"转账消息里的发送人 wxid","default":"wxid_xxxxxxxxxxxxx"},"transferid":{"type":"string","title":"Transferid","description":"转账消息里的 transferid","default":"transferid"},"transactionid":{"type":"string","title":"Transactionid","description":"转账消息里的 transactionid","default":"transactionid"}},"type":"object","title":"Body_receive_transfer_transfer_post"},"Body_send_file_file_post":{"properties":{"path":{"type":"string","title":"Path","description":"本地文件路径,不支持网络路径","default":"C:\\Projs\\WeChatRobot\\TEQuant.jpeg"},"receiver":{"type":"string","title":"Receiver","description":"roomid 或者 wxid","default":"filehelper"}},"type":"object","title":"Body_send_file_file_post"},"Body_send_image_image_post":{"properties":{"path":{"type":"string","title":"Path","description":"图片路径","default":"C:\\Projs\\WeChatRobot\\TEQuant.jpeg"},"receiver":{"type":"string","title":"Receiver","description":"消息接收者,roomid 或者 wxid","default":"filehelper"}},"type":"object","title":"Body_send_image_image_post"},"Body_send_text_text_post":{"properties":{"msg":{"type":"string","title":"Msg","description":"要发送的消息,换行用 \\n 表示"},"receiver":{"type":"string","title":"Receiver","description":"消息接收者,roomid 或者 wxid","default":"filehelper"},"aters":{"type":"string","title":"Aters","description":"要 @ 的 wxid,多个用逗号分隔;@所有人 用 notify@all","default":""}},"type":"object","required":["msg"],"title":"Body_send_text_text_post"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"Msg":{"properties":{"id":{"type":"string","title":"Id"},"type":{"type":"integer","title":"Type"},"xml":{"type":"string","title":"Xml"},"sender":{"type":"string","title":"Sender"},"roomid":{"type":"string","title":"Roomid"},"content":{"type":"string","title":"Content"},"thumb":{"type":"string","title":"Thumb"},"extra":{"type":"string","title":"Extra"},"is_at":{"type":"boolean","title":"Is At"},"is_self":{"type":"boolean","title":"Is Self"},"is_group":{"type":"boolean","title":"Is Group"}},"type":"object","required":["id","type","xml","sender","roomid","content","thumb","extra","is_at","is_self","is_group"],"title":"Msg"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}} \ No newline at end of file +{"openapi":"3.0.2","info":{"title":"WeChatFerry HTTP 客户端","description":"Github: WeChatFerry
\n\n\n\n\n\n\n\n\n\n\n\n\n
\"碲矿\"\"赞赏\"
后台回复 WeChatFerry 加群交流如果你觉得有用
","version":"0.1.0"},"paths":{"/msg_cb":{"post":{"tags":["示例"],"summary":"接收消息回调样例","description":"示例回调方法,简单打印消息","operationId":"msg_cb_msg_cb_post","requestBody":{"content":{"application/json":{"schema":{"title":"Msg","allOf":[{"$ref":"#/components/schemas/Msg"}],"description":"微信消息"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/login":{"get":{"summary":"获取登录状态","description":"获取登录状态","operationId":"is_login_login_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Is Login Login Get","type":"object"}}}}}}},"/wxid":{"get":{"summary":"获取登录账号 wxid","description":"获取登录账号 wxid","operationId":"get_self_wxid_wxid_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Get Self Wxid Wxid Get","type":"object"}}}}}}},"/user-info":{"get":{"summary":"获取登录账号个人信息","description":"获取登录账号个人信息","operationId":"get_user_info_user_info_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Get User Info User Info Get","type":"object"}}}}}}},"/msg-types":{"get":{"summary":"获取消息类型","description":"获取消息类型","operationId":"get_msg_types_msg_types_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Get Msg Types Msg Types Get","type":"object"}}}}}}},"/contacts":{"get":{"summary":"获取完整通讯录","description":"获取完整通讯录","operationId":"get_contacts_contacts_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Get Contacts Contacts Get","type":"object"}}}}}}},"/friends":{"get":{"summary":"获取好友列表","description":"获取好友列表","operationId":"get_friends_friends_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Get Friends Friends Get","type":"object"}}}}}}},"/dbs":{"get":{"summary":"获取所有数据库","description":"获取所有数据库","operationId":"get_dbs_dbs_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Get Dbs Dbs Get","type":"object"}}}}}}},"/{db}/tables":{"get":{"summary":"获取 db 中所有表","description":"获取 db 中所有表\n\nArgs:\n db (str): 数据库名(可通过 `get_dbs` 查询)\n\nReturns:\n List[dict]: `db` 下的所有表名及对应建表语句","operationId":"get_tables__db__tables_get","parameters":[{"required":true,"schema":{"title":"Db","type":"string"},"name":"db","in":"path"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Get Tables Db Tables Get","type":"object"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/text":{"post":{"summary":"发送文本消息","description":"发送文本消息,可参考:https://github.com/lich0821/WeChatRobot/blob/master/robot.py 里 sendTextMsg\n\nArgs:\n msg (str): 要发送的消息,换行使用 `\\\\n`;如果 @ 人的话,需要带上跟 `aters` 里数量相同的 @\n receiver (str): 消息接收人,wxid 或者 roomid\n aters (str): 要 @ 的 wxid,多个用逗号分隔;`@所有人` 只需要 `notify@all`\n\nReturns:\n int: 0 为成功,其他失败","operationId":"send_text_text_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_send_text_text_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Send Text Text Post","type":"object"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/image":{"post":{"summary":"发送图片消息","description":"发送图片,非线程安全\n\nArgs:\n path (str): 图片路径,如:`C:/Projs/WeChatRobot/TEQuant.jpeg` 或 `https://raw.githubusercontent.com/lich0821/WeChatRobot/master/TEQuant.jpeg`\n receiver (str): 消息接收人,wxid 或者 roomid\n\nReturns:\n int: 0 为成功,其他失败","operationId":"send_image_image_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_send_image_image_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Send Image Image Post","type":"object"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/file":{"post":{"summary":"发送文件消息","description":"发送文件\n\nArgs:\n path (str): 本地文件路径,如:`C:/Projs/WeChatRobot/README.MD`\n receiver (str): 消息接收人,wxid 或者 roomid\n\nReturns:\n int: 0 为成功,其他失败","operationId":"send_file_file_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_send_file_file_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Send File File Post","type":"object"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/sql":{"post":{"summary":"执行 SQL,如果数据量大注意分页,以免 OOM","description":"执行 SQL,如果数据量大注意分页,以免 OOM\n\nArgs:\n db (str): 要查询的数据库\n sql (str): 要执行的 SQL\n\nReturns:\n List[dict]: 查询结果","operationId":"query_sql_sql_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_query_sql_sql_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Query Sql Sql Post","type":"object"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/new-friend":{"post":{"summary":"通过好友申请","description":"通过好友申请\n\nArgs:\n v3 (str): 加密用户名 (好友申请消息里 v3 开头的字符串)\n v4 (str): Ticket (好友申请消息里 v4 开头的字符串)\n scene: 申请方式 (好友申请消息里的 scene)\n\nReturns:\n int: 1 为成功,其他失败","operationId":"accept_new_friend_new_friend_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_accept_new_friend_new_friend_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Accept New Friend New Friend Post","type":"object"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/chatroom-member":{"post":{"summary":"添加群成员","description":"添加群成员\n\nArgs:\n roomid (str): 待加群的 id\n wxids (str): 要加到群里的 wxid,多个用逗号分隔\n\nReturns:\n int: 1 为成功,其他失败","operationId":"add_chatroom_members_chatroom_member_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_add_chatroom_members_chatroom_member_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Add Chatroom Members Chatroom Member Post","type":"object"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"summary":"删除群成员","description":"删除群成员\n\nArgs:\n roomid (str): 群的 id\n wxids (str): 要删除的 wxid,多个用逗号分隔\n\nReturns:\n int: 1 为成功,其他失败","operationId":"del_chatroom_members_chatroom_member_delete","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_del_chatroom_members_chatroom_member_delete"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Del Chatroom Members Chatroom Member Delete","type":"object"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/transfer":{"post":{"summary":"接收转账","description":"接收转账\n\nArgs:\n wxid (str): 转账消息里的发送人 wxid\n transferid (str): 转账消息里的 transferid\n transactionid (str): 转账消息里的 transactionid\n\nReturns:\n int: 1 为成功,其他失败","operationId":"receive_transfer_transfer_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_receive_transfer_transfer_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Receive Transfer Transfer Post","type":"object"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/dec-image":{"post":{"summary":"解密图片","description":"解密图片:\n\nArgs:\n src (str): 加密的图片路径\n dst (str): 解密的图片路径\n\nReturns:\n bool: 是否成功","operationId":"decrypt_image_dec_image_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_decrypt_image_dec_image_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Decrypt Image Dec Image Post","type":"object"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"Body_accept_new_friend_new_friend_post":{"title":"Body_accept_new_friend_new_friend_post","type":"object","properties":{"v3":{"title":"V3","type":"string","description":"加密用户名 (好友申请消息里 v3 开头的字符串)","default":"v3"},"v4":{"title":"V4","type":"string","description":"Ticket (好友申请消息里 v4 开头的字符串)","default":"v4"},"scene":{"title":"Scene","type":"integer","description":"申请方式 (好友申请消息里的 scene)","default":30}}},"Body_add_chatroom_members_chatroom_member_post":{"title":"Body_add_chatroom_members_chatroom_member_post","type":"object","properties":{"roomid":{"title":"Roomid","type":"string","description":"待加群的 id","default":"xxxxxxxx@chatroom"},"wxids":{"title":"Wxids","type":"string","description":"要加到群里的 wxid,多个用逗号分隔","default":"wxid_xxxxxxxxxxxxx"}}},"Body_decrypt_image_dec_image_post":{"title":"Body_decrypt_image_dec_image_post","type":"object","properties":{"src":{"title":"Src","type":"string","description":"加密的图片路径,从图片消息中获取","default":"C:\\..."},"dst":{"title":"Dst","type":"string","description":"解密的图片路径","default":"C:\\..."}}},"Body_del_chatroom_members_chatroom_member_delete":{"title":"Body_del_chatroom_members_chatroom_member_delete","type":"object","properties":{"roomid":{"title":"Roomid","type":"string","description":"群的 id","default":"xxxxxxxx@chatroom"},"wxids":{"title":"Wxids","type":"string","description":"要删除的 wxid,多个用逗号分隔","default":"wxid_xxxxxxxxxxxxx"}}},"Body_query_sql_sql_post":{"title":"Body_query_sql_sql_post","type":"object","properties":{"db":{"title":"Db","type":"string","description":"数据库","default":"MicroMsg.db"},"sql":{"title":"Sql","type":"string","description":"SQL 语句","default":"SELECT * FROM Contact LIMIT 1;"}}},"Body_receive_transfer_transfer_post":{"title":"Body_receive_transfer_transfer_post","type":"object","properties":{"wxid":{"title":"Wxid","type":"string","description":"转账消息里的发送人 wxid","default":"wxid_xxxxxxxxxxxxx"},"transferid":{"title":"Transferid","type":"string","description":"转账消息里的 transferid","default":"transferid"},"transactionid":{"title":"Transactionid","type":"string","description":"转账消息里的 transactionid","default":"transactionid"}}},"Body_send_file_file_post":{"title":"Body_send_file_file_post","type":"object","properties":{"path":{"title":"Path","type":"string","description":"本地文件路径,不支持网络路径","default":"C:\\Projs\\WeChatRobot\\TEQuant.jpeg"},"receiver":{"title":"Receiver","type":"string","description":"roomid 或者 wxid","default":"filehelper"}}},"Body_send_image_image_post":{"title":"Body_send_image_image_post","type":"object","properties":{"path":{"title":"Path","type":"string","description":"图片路径","default":"C:\\Projs\\WeChatRobot\\TEQuant.jpeg"},"receiver":{"title":"Receiver","type":"string","description":"消息接收者,roomid 或者 wxid","default":"filehelper"}}},"Body_send_text_text_post":{"title":"Body_send_text_text_post","required":["msg"],"type":"object","properties":{"msg":{"title":"Msg","type":"string","description":"要发送的消息,换行用\\n表示"},"receiver":{"title":"Receiver","type":"string","description":"消息接收者,roomid 或者 wxid","default":"filehelper"},"aters":{"title":"Aters","type":"string","description":"要 @ 的 wxid,多个用逗号分隔;@所有人 用 notify@all","default":""}}},"HTTPValidationError":{"title":"HTTPValidationError","type":"object","properties":{"detail":{"title":"Detail","type":"array","items":{"$ref":"#/components/schemas/ValidationError"}}}},"Msg":{"title":"Msg","required":["id","type","xml","sender","roomid","content","thumb","extra","is_at","is_self","is_group"],"type":"object","properties":{"id":{"title":"Id","type":"string"},"type":{"title":"Type","type":"integer"},"xml":{"title":"Xml","type":"string"},"sender":{"title":"Sender","type":"string"},"roomid":{"title":"Roomid","type":"string"},"content":{"title":"Content","type":"string"},"thumb":{"title":"Thumb","type":"string"},"extra":{"title":"Extra","type":"string"},"is_at":{"title":"Is At","type":"boolean"},"is_self":{"title":"Is Self","type":"boolean"},"is_group":{"title":"Is Group","type":"boolean"}}},"ValidationError":{"title":"ValidationError","required":["loc","msg","type"],"type":"object","properties":{"loc":{"title":"Location","type":"array","items":{"anyOf":[{"type":"string"},{"type":"integer"}]}},"msg":{"title":"Message","type":"string"},"type":{"title":"Error Type","type":"string"}}}}}} \ No newline at end of file diff --git a/docs/source/conf.py b/docs/source/conf.py index 9e701bc..6241784 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -53,6 +53,6 @@ myst_enable_extensions = ["linkify", "colon_fence"] # Document Python Code autoapi_type = "python" -autoapi_dirs = ["../../python/wcferry"] +autoapi_dirs = ["../../clients/python/wcferry"] autoapi_member_order = "groupwise" autoapi_options = ["members", "undoc-members", "show-inheritance", "show-module-summary", "imported-members"]