openVocab通过 HTTP API 查询词典中的单词数据。
fields 可指定返回字段,例如 fields=us,translations。 不传时返回完整字段。curl "/api/dict/basic-en?word=hello" curl "/api/dict/basic-en?word=hello&fields=us,translations"
{"success": true, "data": {...}}。单词本体,通常就是查询词本身。
美式音标。
英式音标。
首选短译,适合列表、卡片和快速展示。
基础释义列表。每一项通常包含 `translation` 和 `type`。
常见短语列表。每一项通常包含 `phrase` 和 `translation`。
例句列表。每一项通常包含 `sentence` 和 `translation`。
{
"word": "hello",
"us": "hɛˈlo, hə-",
"uk": "hə'ləʊ; he-",
"translation": "喂",
"translations": [
{
"translation": "喂",
"type": "int"
}
],
"phrases": [
{
"phrase": "say hello",
"translation": "打招呼;问好"
},
{
"phrase": "hello everyone",
"translation": "大家好"
}
],
"sentences": [
{
"sentence": "Hello, John! How are you?",
"translation": "喂,约翰!你好吗?"
}
]
}