update lookup
This commit is contained in:
1 parent
b32007acd1
commit
7d5114953b
2 files changed
+79
-37
No files matched your search
+29
-16
@@ -23,7 +23,10 @@ export interface IEntry {
|
||||
id: string
|
||||
list: string[]
|
||||
reading: string[]
|
||||
audio: string[]
|
||||
audio: {
|
||||
mimetype?: string
|
||||
url: string
|
||||
}[]
|
||||
translation: string[]
|
||||
type: IType
|
||||
description: string
|
||||
@@ -215,21 +218,6 @@ class Api {
|
||||
})
|
||||
}
|
||||
|
||||
async character_getRadical(params: { entry: string }) {
|
||||
return await this.axios
|
||||
.get('/api/character/radical', { params })
|
||||
.then(
|
||||
(r) =>
|
||||
r.data as {
|
||||
sub: string[]
|
||||
sup: string[]
|
||||
variant: string[]
|
||||
visual: string[]
|
||||
}
|
||||
)
|
||||
.catch(() => null)
|
||||
}
|
||||
|
||||
async character_getVocabulary(
|
||||
params: ILookup<{ entry: string; distinct?: 'id' }>
|
||||
) {
|
||||
@@ -306,6 +294,31 @@ class Api {
|
||||
)
|
||||
}
|
||||
|
||||
async all_getComponent(params: { entry: string; type: IType }) {
|
||||
return await this.axios
|
||||
.get('/api/all/components', { params })
|
||||
.then(
|
||||
(r) =>
|
||||
r.data as {
|
||||
sub: string[]
|
||||
sup: string[]
|
||||
variant: string[]
|
||||
visual: {
|
||||
entry: string
|
||||
}[]
|
||||
amalgamation: {
|
||||
entry: string
|
||||
type?: IType
|
||||
}[]
|
||||
component: {
|
||||
entry: string
|
||||
type?: IType
|
||||
}[]
|
||||
}
|
||||
)
|
||||
.catch(() => null)
|
||||
}
|
||||
|
||||
async all_tokenize(params: { entry: string }) {
|
||||
return await this.axios
|
||||
.get('/api/all/tokenize', {
|
||||
|
||||
Reference in new issue
Block a user