This commit is contained in:
hackrobot
2024-03-20 11:00:53 +08:00
parent c7c41ec45d
commit 7f8deddeee
13 changed files with 1402 additions and 88 deletions

188
README.md
View File

@@ -1,92 +1,104 @@
# kunpengFalsk
#bhrs_KPWXBotDemo
##安装依赖
pip install -r requirements.txt
##项目说明
1.基于 flask 框架 ,直观易懂,上手成本低
2.目前仅支持 http 通信方式
##项目文件说明
###WXBotService.py
1.封装了全部httpapi
2.提供了unicode转emoji方法
3.所有方法发送请求时自动emoji转unicode,自动添加鉴权
4.提供了本地下载图片和解密图片的方法(非httpapi)
###WXBotDemo.py
1.对绝大部分event类型判断
2.自动同意好友请求
3.自动下载表情包
4.自动解密图片
##提供的api列表
| HTTPAPI接口 | WXBotService方法 |
|--------------------|-------------------------------------|
| 初始化[K10001] | initialize |
| 添加日志[K10002] | add_log |
| 关注公众号[K10003] | follow_official_account |
| 转账收款[K10004] | transfer_receipt |
| 转账退款[K10005] | transfer_refund |
| 同意群聊邀请[K10006] | agree_group_invite |
| 消息免打扰[K10007] | message_not_disturb |
| 置顶聊天[K10008] | set_chat_top |
| 切换当前聊天对象[K10009] | change_chat |
| 获取群成员列表[K10010] | get_group_members_list |
| 获取企业群成员列表[K10011] | get_wecom_group_members_list |
| 创建群聊[K10012] | create_group |
| 修改群聊名称[K10013] | update_group_name |
| 发布群公告[K10014] | publish_group_announcement |
| 邀请群成员40人以上[K10015] | add_group_members_40_more |
| 添加群成员40人以下[K10016] | add_group_members_40_less |
| 删除群成员[K10017] | drop_group_member |
| 退出群聊[K10018] | quit_group |
| 获取群内昵称[K10019] | get_group_member_nickname |
| 修改群内昵称[K10020] | update_nickname_in_group |
| 显示或隐藏群成员昵称[K10021] | hide_group_member_nickname |
| 保存到通讯录[K10022] | save_to_address |
| 获取群成员邀请信息[K10023] | get_group_member_invite_information |
| 获取通讯录列表[K10024] | get_address_list |
| 获取企业好友列表[K10025] | get_wecom_friend_list |
| 获取指定好友信息[K10026] | get_friend_info |
| 网络获取指定好友信息[K10027] | get_net_friend_info |
| 删除好友[K10028] | del_friend |
| 修改好友备注[K10029] | update_friend_remark |
| 同意好友请求[K10030] | agree_friend_request |
| 好友状态检测[K10031] | friend_status_detection |
| 拉黑好友[K10032] | add_blacklist |
| 发送文本信息[K10033] | send_text_message |
| 发送图片信息[K10034] | send_image_message |
| 发送文件信息[K10035] | send_file_message |
| 发送GIF信息[K10036] | send_gif_message |
| 发送艾特信息[K10037] | send_at_message |
| 发送名片信息[K10038] | send_card_message |
| 发送链接信息[K10039] | send_link_message |
| 发送小程序信息[K10040] | send_applet_message |
| 转发信息[K10041] | relay_message |
| 取登录状态[K10042] | get_login_status |
| 撤回信息[K10043] | withdraw_message |
| 获取个人信息[K10044] | get_personal_info |
| 取登录账号列表[K10045] | get_login_list |
| 下载图片[K10046] | download_image |
| 解密图片[K10047] | decrypt_image |
| 发送XML信息[K10048] | send_xml_message |
| 刷新朋友圈[K10049] | refresh_moments |
| 获取朋友圈下一页[K10050] | get_moments_next_page |
| 获取个人朋友圈[K10051] | get_personal_moments |
| 朋友圈点赞[K10052] | moments_like |
| 朋友圈取消点赞[K10053] | moments_cancel_like |
##新增方法
| 说明 | WXBotService方法 |
|-------------------|----------------------|
| 本地下载图片 | local_download_image |
| 本地解密dat图片 | local_decrypt_image |
| emoji表情转unicode | emoji_to_unicode |
| unicode格式转emoji表情 | unicode_to_emoji |
| 鉴权计算 | crypt_md5 |
## Getting started
To make it easy for you to get started with GitLab, here's a list of recommended next steps.
Already a pro? Just edit this README.md and make it your own. Want to make it easy? [Use the template at the bottom](#editing-this-readme)!
## Add your files
- [ ] [Create](https://docs.gitlab.com/ee/user/project/repository/web_editor.html#create-a-file) or [upload](https://docs.gitlab.com/ee/user/project/repository/web_editor.html#upload-a-file) files
- [ ] [Add files using the command line](https://docs.gitlab.com/ee/gitlab-basics/add-file.html#add-a-file-using-the-command-line) or push an existing Git repository with the following command:
```
cd existing_repo
git remote add origin http://gitlab.yidooplanet.com/gitlab-instance-0a899031/kunpengfalsk.git
git branch -M main
git push -uf origin main
```
## Integrate with your tools
- [ ] [Set up project integrations](http://gitlab.yidooplanet.com/gitlab-instance-0a899031/kunpengfalsk/-/settings/integrations)
## Collaborate with your team
- [ ] [Invite team members and collaborators](https://docs.gitlab.com/ee/user/project/members/)
- [ ] [Create a new merge request](https://docs.gitlab.com/ee/user/project/merge_requests/creating_merge_requests.html)
- [ ] [Automatically close issues from merge requests](https://docs.gitlab.com/ee/user/project/issues/managing_issues.html#closing-issues-automatically)
- [ ] [Enable merge request approvals](https://docs.gitlab.com/ee/user/project/merge_requests/approvals/)
- [ ] [Automatically merge when pipeline succeeds](https://docs.gitlab.com/ee/user/project/merge_requests/merge_when_pipeline_succeeds.html)
## Test and Deploy
Use the built-in continuous integration in GitLab.
- [ ] [Get started with GitLab CI/CD](https://docs.gitlab.com/ee/ci/quick_start/index.html)
- [ ] [Analyze your code for known vulnerabilities with Static Application Security Testing(SAST)](https://docs.gitlab.com/ee/user/application_security/sast/)
- [ ] [Deploy to Kubernetes, Amazon EC2, or Amazon ECS using Auto Deploy](https://docs.gitlab.com/ee/topics/autodevops/requirements.html)
- [ ] [Use pull-based deployments for improved Kubernetes management](https://docs.gitlab.com/ee/user/clusters/agent/)
- [ ] [Set up protected environments](https://docs.gitlab.com/ee/ci/environments/protected_environments.html)
***
# Editing this README
When you're ready to make this README your own, just edit this file and use the handy template below (or feel free to structure it however you want - this is just a starting point!). Thank you to [makeareadme.com](https://www.makeareadme.com/) for this template.
## Suggestions for a good README
Every project is different, so consider which of these sections apply to yours. The sections used in the template are suggestions for most open source projects. Also keep in mind that while a README can be too long and detailed, too long is better than too short. If you think your README is too long, consider utilizing another form of documentation rather than cutting out information.
## Name
Choose a self-explaining name for your project.
## Description
Let people know what your project can do specifically. Provide context and add a link to any reference visitors might be unfamiliar with. A list of Features or a Background subsection can also be added here. If there are alternatives to your project, this is a good place to list differentiating factors.
## Badges
On some READMEs, you may see small images that convey metadata, such as whether or not all the tests are passing for the project. You can use Shields to add some to your README. Many services also have instructions for adding a badge.
## Visuals
Depending on what you are making, it can be a good idea to include screenshots or even a video (you'll frequently see GIFs rather than actual videos). Tools like ttygif can help, but check out Asciinema for a more sophisticated method.
## Installation
Within a particular ecosystem, there may be a common way of installing things, such as using Yarn, NuGet, or Homebrew. However, consider the possibility that whoever is reading your README is a novice and would like more guidance. Listing specific steps helps remove ambiguity and gets people to using your project as quickly as possible. If it only runs in a specific context like a particular programming language version or operating system or has dependencies that have to be installed manually, also add a Requirements subsection.
## Usage
Use examples liberally, and show the expected output if you can. It's helpful to have inline the smallest example of usage that you can demonstrate, while providing links to more sophisticated examples if they are too long to reasonably include in the README.
## Support
Tell people where they can go to for help. It can be any combination of an issue tracker, a chat room, an email address, etc.
## Roadmap
If you have ideas for releases in the future, it is a good idea to list them in the README.
## Contributing
State if you are open to contributions and what your requirements are for accepting them.
For people who want to make changes to your project, it's helpful to have some documentation on how to get started. Perhaps there is a script that they should run or some environment variables that they need to set. Make these steps explicit. These instructions could also be useful to your future self.
You can also document commands to lint the code or run tests. These steps help to ensure high code quality and reduce the likelihood that the changes inadvertently break something. Having instructions for running tests is especially helpful if it requires external setup, such as starting a Selenium server for testing in a browser.
## Authors and acknowledgment
Show your appreciation to those who have contributed to the project.
## License
For open source projects, say how it is licensed.
## Project status
If you have run out of energy or time for your project, put a note at the top of the README saying that development has slowed down or stopped completely. Someone may choose to fork your project or volunteer to step in as a maintainer or owner, allowing your project to keep going. You can also make an explicit request for maintainers.