From c2871119a4421a31c70afc2f27972113b830f8a3 Mon Sep 17 00:00:00 2001 From: Alex Yatskov Date: Wed, 1 Feb 2017 09:21:00 -0800 Subject: [PATCH] delete unused apis --- AnkiConnect.py | 34 ---------------------------------- 1 file changed, 34 deletions(-) diff --git a/AnkiConnect.py b/AnkiConnect.py index 44ccc8c..0d2c13d 100644 --- a/AnkiConnect.py +++ b/AnkiConnect.py @@ -325,22 +325,6 @@ class AnkiBridge: return note - def browseNote(self, deckName, modelName, fields): - fields = self.modelFieldNames(modelName) - if fields is None: - return - - fieldName = fields[0] - fieldValue = fields.get(fieldName) - - if fieldValue is None: - return - - browser = aqt.dialogs.open('Browser', self.window()) - browser.form.searchEdit.lineEdit().setText('deck:{} {}:{}'.format(deckName, fieldName, fieldValue)) - browser.onSearch() - - def startEditing(self): self.window().requireReset() @@ -445,24 +429,6 @@ class AnkiConnect: return results - def api_browseNote(self, note): - return self.anki.browseNote( - note['deckName'], - note['modelName'], - note['fields'] - ) - - - def api_features(self): - features = {} - for name in dir(self): - method = getattr(self, name) - if name.startswith('api_') and callable(method): - features[name[4:]] = list(method.func_code.co_varnames[1:]) - - return features - - def api_version(self): return API_VERSION