Python gewe框架模板项目:构建微信聊天机器人的新起点
是一个基于 gewe的 Python 项目模板,它简化了创建和开发自定义微信聊天机器人的流程,让开发者能够快速入门并实现自己的功能。
常见开发功能:
好友管理:添加好友、删除好友、修改备注、创建标签、获取好友列表、搜索好友信息
消息管理:发文本消息、图片消息、名片消息、动图表情、小程序、发文件、发送视频、发送URL链接
群管理:自动创群、修改群名称、邀请新成员、踢群成员、获取群列表、发送邀请链接、获取群聊
朋友圈:发送朋友圈、朋友圈点赞、获取朋友圈列表、转发朋友圈、同步朋友圈
基于API您可以创造更多有趣的功能....
请求参数
Header 参数
export interface ApifoxModel {
"X-GEWE-TOKEN": string;
[property: string]: any;
}
Body 参数application/json
export interface ApifoxModel {
/**
* 设备ID
*/
appId: string;
/**
* 好友的wxid
*/
wxids: string[];
[property: string]: any;
}
示例
{
"appId": "",
"wxids": [
"yc-081726"
]
}
示例代码
curl --location --request POST 'http://api.geweapi.com/gewe/v2/api/contacts/getDetailInfo' \
--header 'X-GEWE-TOKEN: ' \
--header 'User-Agent: Apifox/1.0.0 (https://apifox.com)' \
--header 'Content-Type: application/json' \
--data-raw '{
"appId": "",
"wxids": [
"yc-081726"
]
}'
返回响应
成功(200)
HTTP 状态码: 200 内容格式: JSONapplication/json
数据结构
export interface ApifoxModel {
data: Datum[];
msg: string;
ret: number;
[property: string]: any;
}
export interface Datum {
/**
* 好友的微信号
*/
alias?: string;
/**
* 大尺寸头像链接
*/
bigHeadImgUrl?: string;
/**
* 好友描述的图片链接
*/
cardImgUrl?: null;
/**
* 城市
*/
city?: null;
/**
* 国家
*/
country?: string;
/**
* 好友的描述
*/
description?: null;
/**
* 好友的标签ID
*/
labelList?: null;
/**
* 好友的昵称
*/
nickName?: string;
/**
* 好友的手机号码
*/
phoneNumList?: null;
/**
* 省份
*/
province?: null;
/**
* 好友昵称的拼音首字母
*/
pyInitial?: null;
/**
* 好友昵称的全拼
*/
quanPin?: string;
/**
* 好友备注
*/
remark?: null;
/**
* 好友备注的拼音首字母
*/
remarkPyInitial?: null;
/**
* 好友备注的全拼
*/
remarkQuanPin?: null;
/**
* 好友的性别
*/
sex?: number;
/**
* 好友的签名
*/
signature?: string;
/**
* 小尺寸头像链接
*/
smallHeadImgUrl?: string;
/**
* 朋友圈背景图链接
*/
snsBgImg?: string;
/**
* 好友的wxid
*/
userName?: string;
[property: string]: any;
}
示例
{
"ret": 200,
"msg": "获取联系人信息成功",
"data": [
{
"userName": "wxid_phyyedw9xap22",
"nickName": "Ashley",
"pyInitial": null,
"quanPin": "Ashley",
"sex": 2,
"remark": null,
"remarkPyInitial": null,
"remarkQuanPin": null,
"signature": "山林不向四季起誓 枯荣随缘。",
"alias": "zero-one_200906",
"snsBgImg": "http://shmmsns.qpic.cn/mmsns/UaAfqYic92wm7ZCrsEwlQMXSmBLs8dpwBzrXnrOyyP3B8bDibCCFInJ9PicC9LPYY17uWH1yIOmBYQ/0",
"country": "AD",
"bigHeadImgUrl": "https://wx.qlogo.cn/mmhead/ver_1/buiaXybHTBK3BuGr1edN72zBDermWVFJ7YC8Jib2RcCSdiauAtZcPgUQpdhE9KY5NsumDAWD16fsg3A6OKuhdEr97VAHdTGgk6R1Eibuj7ZNwJ4/0",
"smallHeadImgUrl": "https://wx.qlogo.cn/mmhead/ver_1/buiaXybHTBK3BuGr1edN72zBDermWVFJ7YC8Jib2RcCSdiauAtZcPgUQpdhE9KY5NsumDAWD16fsg3A6OKuhdEr97VAHdTGgk6R1Eibuj7ZNwJ4/132",
"description": null,
"cardImgUrl": null,
"labelList": null,
"province": null,
"city": null,
"phoneNumList": null
}
]
}