1.0.2 优化打开逻辑

This commit is contained in:
睿 安
2025-09-17 12:57:41 +08:00
parent a2a77558bd
commit 0502a9ddb8
11 changed files with 267 additions and 61 deletions

71
第三方API.md Normal file
View File

@@ -0,0 +1,71 @@
pvfUtility WebApi
介绍
pvfUtility 2020开始 一项重大的更新就是提供了HTTP接口进行自动化操作
这使得第三方工具可以利用http rest api进行文件读写
只需在软件内打开pvf,就能通过第三方工具进行下一步的操作
获取pvfUtility版本号
插件作者可以以版本来来确定用户当前使用的pvfUtility是否适用某些API接口
请求类型GET
http://localhost:/Api/PvfUtiltiy/getVersion
返回结果
//注使用此接口pvfUtility版本号需大于2022.9.30.2
{"Data":"2022.9.30.3","IsError":false,"Msg":null}
获取nut文件列表
请求类型GET
http://localhost:/Api/PvfUtiltiy/GetFileList?dirName=sqr&returnType=0&fileType=nut
解释dirName=equipment(目录名称)
fileType=.equ(文件后缀名) 注使用fileType pvfUtility版本号必须大于2022.08.08.2
返回结果示例(returnType=1)
{
"Data": [
"sqr/arad_cashshop.nut",
"sqr/hair_avagacha.nut",
"sqr/neck_avagacha.nut",
"sqr/belt_avagacha.nut"
],
"IsError": false,
"Msg": null
}
批量获取nut文件内容
请求类型POST
http://localhost:/Api/PvfUtiltiy/GetFileContents
请求参数
{"FileList":["sqr/arad_cashshop.nut","sqr/neck_avagacha.nut"],"UseCompatibleDecompiler":false,"EncodingType":Null}
解释
UseCompatibleDecompiler=是否使用兼容性反编译器
使用encodingType参数 pvfUtility版本号需大于2022.12.3.1
//encodingType:仅适用于文本文件默认使用UTF8
//TW=中国台湾
//CN=中国大陆
//KR=韩国
//JP=日本
//UTF8
//Unicode
返回结果示例(注文件内容为utf-8编码)
{
{"Data":{"FileContentData":{"sqr/arad_cashshop.nut":"\r\nlocal a = 0;\r\n","sqr/neck_avagacha.nut":"\r\nlocal b = 1;\r\n"}},"IsError":false,"Msg":null}
上传新的文件内容
新增或覆盖文件内容
请求类型POST
http://localhost:/Api/PvfUtiltiy/ImportFile?filePath=[文件路径]
请求参数(文本内容)
文件内容
返回结果
{"IsError":false,"Msg":null}