baidu-translate-service
Advanced tools
Comparing version 2.2.1 to 2.2.2
{ | ||
"name": "baidu-translate-service", | ||
"version": "2.2.1", | ||
"version": "2.2.2", | ||
"description": "BaiDu Universal translation API access document", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -10,9 +10,9 @@ # baidu-translate-service | ||
q |string| 是| 请求翻译query |UTF-8编码 | ||
from |string| 是| 翻译源语言| 可设置为auto | ||
to |string| 是| 翻译目标语言| 不可设置为auto | ||
appid |string| 是| APPID| 可在管理控制台查看 | ||
key| string| 是| 秘钥| 在控制台申请查看 | ||
tts| integer |否| 是否显示语音合成资源| 0-显示,1-不显示 | ||
dict| integer| 否| 是否显示词典资源| 0-显示,1-不显示 | ||
action| integer| 否 |判断是否需要使用自定义术语干预API| 1-是,0-否 | ||
from |string| 否| 翻译源语言| 默认值为auto | ||
tts| integer |否| 是否显示语音合成资源| 0-显示,1-不显示,默认值为 1 | ||
dict| integer| 否| 是否显示词典资源| 0-显示,1-不显示 ,默认值为 1 | ||
action| integer| 否 |判断是否需要使用自定义术语干预API| 1-是,0-否,默认值为 0 | ||
@@ -29,3 +29,15 @@ ## Response | ||
```html | ||
<script src="./lib/baiduTranslateService.js"></script> | ||
<script src="https://unpkg.com/baidu-translate-service/lib/baiduTranslateService.js"></script> | ||
<script> | ||
baiduTranslateService({ | ||
appid: "", | ||
key: "", | ||
to: "en", | ||
q: "今天星期几?", | ||
}).then((result) => { | ||
console.log(result); | ||
}); | ||
</script> | ||
``` | ||
@@ -46,3 +58,2 @@ | ||
to: "en", | ||
from: "auto", | ||
q: "今天星期几?", | ||
@@ -49,0 +60,0 @@ }).then((result) => { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
19217
63