commit
a37b7ce5ae
File diff suppressed because one or more lines are too long
@ -33,7 +33,7 @@ setup(
|
|||||||
"setuptools",
|
"setuptools",
|
||||||
"fastapi",
|
"fastapi",
|
||||||
"uvicorn[standard]",
|
"uvicorn[standard]",
|
||||||
"wcferry==37.1.25.5",
|
"wcferry==39.0.0.0a3",
|
||||||
],
|
],
|
||||||
classifiers=[
|
classifiers=[
|
||||||
"Environment :: Win32 (MS Windows)",
|
"Environment :: Win32 (MS Windows)",
|
||||||
|
@ -10,7 +10,7 @@ from fastapi import Body, FastAPI
|
|||||||
from pydantic import BaseModel
|
from pydantic import BaseModel
|
||||||
from wcferry import Wcf, WxMsg
|
from wcferry import Wcf, WxMsg
|
||||||
|
|
||||||
__version__ = "37.1.25.5"
|
__version__ = "39.0.0.0a3"
|
||||||
|
|
||||||
|
|
||||||
class Msg(BaseModel):
|
class Msg(BaseModel):
|
||||||
@ -50,8 +50,8 @@ class Http(FastAPI):
|
|||||||
self.add_api_route("/text", self.send_text, methods=["POST"], summary="发送文本消息")
|
self.add_api_route("/text", self.send_text, methods=["POST"], summary="发送文本消息")
|
||||||
self.add_api_route("/image", self.send_image, methods=["POST"], summary="发送图片消息")
|
self.add_api_route("/image", self.send_image, methods=["POST"], summary="发送图片消息")
|
||||||
self.add_api_route("/file", self.send_file, methods=["POST"], summary="发送文件消息")
|
self.add_api_route("/file", self.send_file, methods=["POST"], summary="发送文件消息")
|
||||||
self.add_api_route("/xml", self.send_xml, methods=["POST"], summary="发送 XML 消息")
|
# self.add_api_route("/xml", self.send_xml, methods=["POST"], summary="发送 XML 消息")
|
||||||
self.add_api_route("/emotion", self.send_emotion, methods=["POST"], summary="发送表情消息")
|
# self.add_api_route("/emotion", self.send_emotion, methods=["POST"], summary="发送表情消息")
|
||||||
self.add_api_route("/sql", self.query_sql, methods=["POST"], summary="执行 SQL,如果数据量大注意分页,以免 OOM")
|
self.add_api_route("/sql", self.query_sql, methods=["POST"], summary="执行 SQL,如果数据量大注意分页,以免 OOM")
|
||||||
self.add_api_route("/new-friend", self.accept_new_friend, methods=["POST"], summary="通过好友申请")
|
self.add_api_route("/new-friend", self.accept_new_friend, methods=["POST"], summary="通过好友申请")
|
||||||
self.add_api_route("/chatroom-member", self.add_chatroom_members, methods=["POST"], summary="添加群成员")
|
self.add_api_route("/chatroom-member", self.add_chatroom_members, methods=["POST"], summary="添加群成员")
|
||||||
@ -156,13 +156,13 @@ class Http(FastAPI):
|
|||||||
def send_text(
|
def send_text(
|
||||||
self, msg: str = Body(description="要发送的消息,换行用\\n表示"),
|
self, msg: str = Body(description="要发送的消息,换行用\\n表示"),
|
||||||
receiver: str = Body("filehelper", description="消息接收者,roomid 或者 wxid"),
|
receiver: str = Body("filehelper", description="消息接收者,roomid 或者 wxid"),
|
||||||
aters: str = Body("", description="要 @ 的 wxid,多个用逗号分隔;@所有人 用 nofity@all")) -> dict:
|
aters: str = Body("", description="要 @ 的 wxid,多个用逗号分隔;@所有人 用 notify@all")) -> dict:
|
||||||
"""发送文本消息,可参考:https://github.com/lich0821/WeChatRobot/blob/master/robot.py 里 sendTextMsg
|
"""发送文本消息,可参考:https://github.com/lich0821/WeChatRobot/blob/master/robot.py 里 sendTextMsg
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
msg (str): 要发送的消息,换行使用 `\\n`;如果 @ 人的话,需要带上跟 `aters` 里数量相同的 @
|
msg (str): 要发送的消息,换行使用 `\\n`;如果 @ 人的话,需要带上跟 `aters` 里数量相同的 @
|
||||||
receiver (str): 消息接收人,wxid 或者 roomid
|
receiver (str): 消息接收人,wxid 或者 roomid
|
||||||
aters (str): 要 @ 的 wxid,多个用逗号分隔;`@所有人` 只需要 `nofity@all`
|
aters (str): 要 @ 的 wxid,多个用逗号分隔;`@所有人` 只需要 `notify@all`
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
int: 0 为成功,其他失败
|
int: 0 为成功,其他失败
|
||||||
@ -293,17 +293,19 @@ class Http(FastAPI):
|
|||||||
|
|
||||||
def receive_transfer(self,
|
def receive_transfer(self,
|
||||||
wxid: str = Body("wxid_xxxxxxxxxxxxx", description="转账消息里的发送人 wxid"),
|
wxid: str = Body("wxid_xxxxxxxxxxxxx", description="转账消息里的发送人 wxid"),
|
||||||
transferid: str = Body("transferid", description="转账消息里的 transferid")) -> dict:
|
transferid: str = Body("transferid", description="转账消息里的 transferid"),
|
||||||
|
transactionid: str = Body("transactionid", description="转账消息里的 transactionid")) -> dict:
|
||||||
"""接收转账
|
"""接收转账
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
wxid (str): 转账消息里的发送人 wxid
|
wxid (str): 转账消息里的发送人 wxid
|
||||||
transferid (str): 转账消息里的 transferid
|
transferid (str): 转账消息里的 transferid
|
||||||
|
transactionid (str): 转账消息里的 transactionid
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
int: 1 为成功,其他失败
|
int: 1 为成功,其他失败
|
||||||
"""
|
"""
|
||||||
ret = self.wcf.receive_transfer(wxid, transferid)
|
ret = self.wcf.receive_transfer(wxid, transferid, transactionid)
|
||||||
return {"status": ret, "message": "成功"if ret == 1 else "失败"}
|
return {"status": ret, "message": "成功"if ret == 1 else "失败"}
|
||||||
|
|
||||||
def decrypt_image(self,
|
def decrypt_image(self,
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#! /usr/bin/env python3
|
#! /usr/bin/env python3
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
__version__ = "39.0.0.0a2"
|
__version__ = "39.0.0.0a3"
|
||||||
|
|
||||||
import atexit
|
import atexit
|
||||||
import base64
|
import base64
|
||||||
@ -236,7 +236,7 @@ class Wcf():
|
|||||||
Args:
|
Args:
|
||||||
msg (str): 要发送的消息,换行使用 `\\n`;如果 @ 人的话,需要带上跟 `aters` 里数量相同的 @
|
msg (str): 要发送的消息,换行使用 `\\n`;如果 @ 人的话,需要带上跟 `aters` 里数量相同的 @
|
||||||
receiver (str): 消息接收人,wxid 或者 roomid
|
receiver (str): 消息接收人,wxid 或者 roomid
|
||||||
aters (str): 要 @ 的 wxid,多个用逗号分隔;`@所有人` 只需要 `nofity@all`
|
aters (str): 要 @ 的 wxid,多个用逗号分隔;`@所有人` 只需要 `notify@all`
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
int: 0 为成功,其他失败
|
int: 0 为成功,其他失败
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
#define SUPPORT_VERSION L"3.9.2.23"
|
#define SUPPORT_VERSION L"3.9.2.23"
|
||||||
WxCalls_t wxCalls = {
|
WxCalls_t wxCalls = {
|
||||||
0x2FFD638, // Login Status
|
0x2FFD638, // Login Status
|
||||||
{ 0x2FFD4E8, 0x2FFD590, 0x2FFD500, 0x30238CC }, // User Info: wxid, nickname, mobile, home
|
{ 0x2FFD484, 0x2FFD590, 0x2FFD500, 0x30238CC }, // User Info: wxid, nickname, mobile, home
|
||||||
{ 0x768140, 0xCE6C80, 0x756960 }, // Send Message
|
{ 0x768140, 0xCE6C80, 0x756960 }, // Send Message
|
||||||
/* Receive Message:
|
/* Receive Message:
|
||||||
Hook, call, type, self, id, msgXml, roomId, wxId, content, thumb, extra */
|
Hook, call, type, self, id, msgXml, roomId, wxId, content, thumb, extra */
|
||||||
|
Loading…
Reference in New Issue
Block a user