方法列表
添加脚本
admin
user
RPC
createScript (CreateScriptRequest) returns (CreateScriptResponse)
HTTP
POST /ScriptService/createScript
输入对象:CreateScriptRequest:
{ // 名称 string name; // 文件名 string filename; string code; }
输出对象:CreateScriptResponse:
删除脚本
admin
user
RPC
deleteScript (DeleteScriptRequest) returns (RPCSuccess)
HTTP
POST /ScriptService/deleteScript
输入对象:DeleteScriptRequest:
输出对象:RPCSuccess:
{ }
计算脚本数量
admin
user
RPC
countAllEnabledScripts (CountAllEnabledScriptsRequest) returns (RPCCountResponse)
HTTP
POST /ScriptService/countAllEnabledScripts
输入对象:CountAllEnabledScriptsRequest:
{ // 用户ID int64 userId; }
输出对象:RPCCountResponse:
{ // 数量 int64 count; }
列出单页脚本
admin
user
RPC
listEnabledScripts (ListEnabledScriptsRequest) returns (ListEnabledScriptsResponse)
HTTP
POST /ScriptService/listEnabledScripts
输入对象:ListEnabledScriptsRequest:
{ // 用户ID int64 userId; // 读取位置 int64 offset; // 数量,通常不能小于0 int64 size; }
输出对象:ListEnabledScriptsResponse:
发布脚本
admin
user
RPC
publishScripts (PublishScriptsRequest) returns (RPCSuccess)
HTTP
POST /ScriptService/publishScripts
输入对象:PublishScriptsRequest:
{ // 用户ID int64 userId; }
输出对象:RPCSuccess:
{ }
检查脚本是否需要有更新
admin
user
RPC
checkScriptUpdates (CheckScriptUpdatesRequest) returns (CheckScriptUpdatesResponse)
HTTP
POST /ScriptService/checkScriptUpdates
输入对象:CheckScriptUpdatesRequest:
{ // 用户ID int64 userId; }
输出对象:CheckScriptUpdatesResponse:
查找单个脚本
admin
user
RPC
findEnabledScript (FindEnabledScriptRequest) returns (FindEnabledScriptResponse)
HTTP
POST /ScriptService/findEnabledScript
输入对象:FindEnabledScriptRequest:
输出对象:FindEnabledScriptResponse:
修改脚本
admin
user
RPC
updateScript (UpdateScriptRequest) returns (RPCSuccess)
HTTP
POST /ScriptService/updateScript
输入对象:UpdateScriptRequest:
{ int64 scriptId; // 名称 string name; // 文件名 string filename; string code; // 是否启用 bool isOn; }
输出对象:RPCSuccess:
{ }