雀魂通信客户端
完成了雀魂底层protobuf数据的解析,转换为可读的json数据
Install with npm:
$ npm i mjsoul
Example:
const MJSoul = require("mjsoul")
const mjsoul = new MJSoul()
let login = async()=>{
//登陆
let data = await mjsoul.sendAsync(
"login",
{account: "account", password: mjsoul.hash("password"), client_version_string: "web-0.9.205"}
)
console.log(data)
//获取好友列表
data = await mjsoul.sendAsync("fetchFriendList")
console.log(data)
}
//绑定事件
mjsoul.on("NotifyAccountLogout", login)
mjsoul.open(login)
详细使用方法请参阅以下资料: