添加配置-百度
POST
/api/saveConfig
最后修改时间:2024-07-25 02:48:26
请求参数
Body 参数application/json
platform
string
录入的平台名称
status
boolean
必需
level
integer
等级越高优先级越低
cfg
object
必需
key
string
必需
appId
string
必需
url
string
必需
curlTimeOut
integer
必需
type
string
必需
示例
{
"platform": "百度1", // 录入的平台名称
"status": true, // 状态 true 打开 false 关闭
"level": 1, // 等级越高优先级越低
"cfg": { // 配置具体配置按照平台
"key": "",
"appId": "",
"url": "https://fanyi-api.baidu.com/api/trans/vip/translate",
"curlTimeOut": 1000
},
"type": "Baidu" // 平台类型 Baidu YouDao Google PaPaGo ChatGPT HuoShan Tencent XunFei XunFeiNiu Deepl
}
示例代码
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST '/api/saveConfig' \
--header 'Content-Type: application/json' \
--data-raw '{
"platform": "百度1", // 录入的平台名称
"status": true, // 状态 true 打开 false 关闭
"level": 1, // 等级越高优先级越低
"cfg": { // 配置具体配置按照平台
"key": "",
"appId": "",
"url": "https://fanyi-api.baidu.com/api/trans/vip/translate",
"curlTimeOut": 1000
},
"type": "Baidu" // 平台类型 Baidu YouDao Google PaPaGo ChatGPT HuoShan Tencent XunFei XunFeiNiu Deepl
}'
返回响应
🟢200成功
application/json
Body
code
integer
状态码
data
array[string]
返回的数据
msg
string
系统信息
time
integer
当前系统时间
示例
{
"code": 1000,
"data": [],
"msg": "SUCCESS !!!",
"time": 1715393900901
}
修改于 2024-07-25 02:48:26