WeChat Hook API
result = sendMsg("wxid_thisisfortest", "你好")
print(result['msg'])
result = sendFile("wxid_thisisfortest", "c:\\temp.zip")
print(result['msg'])
result = sendImage("wxid_thisisfortest", "c:\\temp.jpg")
print(result['msg'])
result = sendCardMsg("wxid_thisisfortest", "wxid_thisisfortest", "HelloWorld")
print(result['msg'])
result = addUser("wxid_thisisfortest", "添加好友招呼")
print(result['msg'])
result = delUser("wxid_thisisfortest")
print(result['msg'])
temp = getRoomUserList("test@chatroom")
print temp['roomid'], temp['accounts'], temp['roommasterid']
temp = getAllRoomUserList()
for oneRoom in temp:
print oneRoom['roommasterid'], oneRoom['roomid'], oneRoom['accounts']
temp = getUserList()
for user in temp:
print user['account'], user['wxid'], user['nickname'], user['remark'], user['avatar']
result = setRoomAnnouncement("test@chatroom", "群里会自动推送撸羊毛的线报,请自行关注")
print(result['msg'])
temp = getUserList()
for user in temp:
if user['wxid'] == "wxid_thisisfortest":
nickname = user['nickname']
result = sendRoomAtMsg("test@chatroom", "wxid_thisisfortest", nickname, "测试")
print(result['msg'])
result = delRoomUser("test@chatroom", "wxid_thisisfortest")
print(result['msg'])
result = addRoomUser("test@chatroom", "wxid_thisisfortest")
print(result['msg'])
temp = getRoomUserList("test@chatroom")
temp = getAllRoomUserList()
for oneRoom in temp:
templist = [account for account in oneRoom['accounts'].split("^G") if account != '']
for wxid in templist:
result = getUserInfo(wxid)
print result['wxid'], result['nickname'], result['wxnumber']
result = editGroupName("test@chatroom", '羊毛裙')
print(result['msg'])
result = quitGroup("test@chatroom")
print(result['msg'])
联系作者:xiaochao_perish