diff options
author | toasted-nutbread <toasted-nutbread@users.noreply.github.com> | 2020-04-18 14:12:41 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-18 14:12:41 -0400 |
commit | 106172e2c1261f2d685802280af580c70ac4580b (patch) | |
tree | 1e96325ee884db8c946e7401882fd7b46f3552e8 /ext/mixed/js/api.js | |
parent | 9e7750125c40d1c4121e8d015957606721bede7c (diff) | |
parent | cdd817a0e1c573b24114836a389236f49dd9b279 (diff) |
Merge pull request #447 from toasted-nutbread/util-conversions
Util conversions
Diffstat (limited to 'ext/mixed/js/api.js')
-rw-r--r-- | ext/mixed/js/api.js | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/ext/mixed/js/api.js b/ext/mixed/js/api.js index 30c08347..7080d93a 100644 --- a/ext/mixed/js/api.js +++ b/ext/mixed/js/api.js @@ -116,6 +116,30 @@ function apiGetDefaultAnkiFieldTemplates() { return _apiInvoke('getDefaultAnkiFieldTemplates'); } +function apiGetAnkiDeckNames() { + return _apiInvoke('getAnkiDeckNames'); +} + +function apiGetAnkiModelNames() { + return _apiInvoke('getAnkiModelNames'); +} + +function apiGetAnkiModelFieldNames(modelName) { + return _apiInvoke('getAnkiModelFieldNames', {modelName}); +} + +function apiGetDictionaryInfo() { + return _apiInvoke('getDictionaryInfo'); +} + +function apiGetDictionaryCounts(dictionaryNames, getTotal) { + return _apiInvoke('getDictionaryCounts', {dictionaryNames, getTotal}); +} + +function apiPurgeDatabase() { + return _apiInvoke('purgeDatabase'); +} + function _apiInvoke(action, params={}) { const data = {action, params}; return new Promise((resolve, reject) => { |