Add multi function

This commit is contained in:
David Bailey 2017-07-27 18:32:34 +01:00
parent fbf938bf49
commit b8e63c383d

View File

@ -428,6 +428,13 @@ class AnkiBridge:
return [field['name'] for field in model['flds']] return [field['name'] for field in model['flds']]
def multi(self, actions):
response = []
for item in actions:
response.append(AnkiConnect.handler(ac, item))
return response
def deckNames(self): def deckNames(self):
collection = self.collection() collection = self.collection()
if collection is not None: if collection is not None:
@ -620,6 +627,11 @@ class AnkiConnect:
return self.anki.modelFieldNames(modelName) return self.anki.modelFieldNames(modelName)
@webApi
def multi(self, actions):
return self.anki.multi(actions)
@webApi @webApi
def addNote(self, note): def addNote(self, note):
params = AnkiNoteParams(note) params = AnkiNoteParams(note)