不要低估迅捷斥候的威力。
本项目用于和英雄联盟游戏客户端进行请求和通信。
本项目适用于:
- Windows
- League Of Legends
在https://127.0.0.1:<PORT>/help
可以查看。
需要注意的是:如果注册了某事件,会触发这个事件及其所有子事件。比如注册/lol-lobby/v2/lobby
事件,那么/lol-lobby/v2/lobby/members
也会触发事件回调.
对局开始后通过https://127.0.0.1:2999/swagger/v3/openapi.json
查看接口地址。
可在官方文档中搜索2999
即可找到所有api的功能描述。
https://hextechdocs.dev/getting-started-with-the-lcu-websocket/
示例:https://gist.github.com/Pupix/eb662b1b784bb704a1390643738a8c15
- 初始化数据;
- api转发;
- ws连接;
- ws检查;
- ws关闭;
- 程序关闭。
- 若401,返回至1;
- 若被拒绝,返回至1;
- 若关闭程序,停止所有循环。
https://zhuanlan.zhihu.com/p/535828881
word": String("UWpTutcT0rme7Lfw"), "partyId": String("INVID4148783830"), "partyType": String(""), "restrictions": Null, "scarcePositions": Array [], "warnings": Null}, "uri": String("/lol-lobby/v2/lobby")}
thread 'tokio-runtime-worker' panicked at E:\Users\wa\Documents\codes\Teemo\src\utils.rs:148:23:
called `Result::unwrap()` on an `Err` value: Io(Os { code: 10054, kind: ConnectionReset, message: "远程主机强迫关闭了一 个现有的连接。" })
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
# 运行示例:管理员身份打开终端并运行以下命令
cargo run --package teemo --example teemo