Repository navigation
HsMod Web Api #122
Closed
Pik-4
announced in
Announcements
Replies: 1 comment
|
感謝您提供的專案和思路! |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
HsMod的默认解析
Hearthstone\BepInEx\HsMod下所有文件;默认监听本地0.0.0.0:58744;按F4可以重启webserver。如果需要其他额外接口,请提出说明。HsMod parses all files in
Hearthstone\BepInEx\HsModby default; listens to local0.0.0.0:58744by default; pressF4to restart the webserver. If you need other additional interfaces, please provide instructions.建议开发前删除
BepInEx\HsMod.cfg,使其重新生成。It is recommended to delete
BepInEx\HsMod.cfgbefore development and regenerate it.目前已完成以下接口:
The following interfaces have been completed:
进程状态,炉石登陆状态
Process status, Hearthstone login status
HsMod配置,可以从这里解析HsMod当前配置
HsMod configuration, you can parse the current configuration of HsMod from here
皮肤映射配置
Skin Mapping Configuration
jquery.min.js
原有webpage;其中配置管理会去访问
./BepInEx/HsMod/config/index.html,如果有配置管理工具,建议优先放在这里。The original webpage; the configuration management will access
./BepInEx/HsMod/config/index.html. If there is a configuration management tool, it is recommended to put it here first.shell;需要开启webshell功能,shell开关选项不会被web api修改。
shell; the
isWebshellEnableneeds to be enabled, and the shell switch option will not be modified by the web api.日志或程序信息
Log or program information
修改配置,需要两个参数,key和value,其中key对应配置名称(参考
GET /hsmod.cfg)或代码中原始名称(https://github.com/Pik-4/HsMod/blob/bepinex5/HsMod/Languages/zhCN.json),如果修改成功,会返回json字符串,其中,成功时status为200,value为修改后的值。注意,如果传入错误参数,返回可能不为json;返回200时,如果value超出key的许可范围,会将key重置为默认值,并返回。To modify the configuration, two parameters are required,
keyandvalue, wherekeycorresponds to the configuration name (refer toGET /hsmod.cfg) or the original name in the code(https://github.com/Pik-4/HsMod/blob/bepinex5/HsMod/Languages/enUS.json). If the modification is successful, a json string will be returned, wherestatusis 200 when successful andvalueis the modified value. Note that if the wrong parameters are passed in, the return may not be json; when200is returned, if the value exceeds the permitted range of thekey, thekeywill be reset to the default value and returned.修改文件内容,需要两个参数,key和value,其中key对应配置文件名称,目前仅支持
HsSkins.cfg的修改,如果修改成功,会返回json字符串,其中,成功时status为200,value为修改后的值。注意,如果传入错误参数,返回可能不为json。To modify the file content, two parameters are required, key and value. The key corresponds to the configuration file name. Currently, only
HsSkins.cfgcan be modified. If the modification is successful, a json string will be returned. If successful, the status is 200 and the value is the modified value. Note that if the wrong parameters are passed in, the return value may not be json.All reactions