From d4759223f88d06082daa1a7164fc36196c476b73 Mon Sep 17 00:00:00 2001 From: Albert Date: Sat, 25 May 2019 21:14:09 +0200 Subject: [PATCH 1/2] Add review times to response --- AnkiConnect.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/AnkiConnect.py b/AnkiConnect.py index a4535ad..3e4b050 100644 --- a/AnkiConnect.py +++ b/AnkiConnect.py @@ -1277,13 +1277,15 @@ class AnkiConnect: fields[name] = {'value': note.fields[order], 'order': order} if card is not None: + buttonList = reviewer._answerButtonList() return { 'cardId': card.id, 'fields': fields, 'fieldOrder': card.ord, 'question': card._getQA()['q'], 'answer': card._getQA()['a'], - 'buttons': [b[0] for b in reviewer._answerButtonList()], + 'buttons': [b[0] for b in buttonList], + 'nextReviews': [reviewer.mw.col.sched.nextIvlStr(reviewer.card, b[0], True) for b in buttonList], 'modelName': model['name'], 'deckName': self.deckNameFromId(card.did), 'css': model['css'], From 410cd83b5787245deda9164bd6f7b9757d2406e0 Mon Sep 17 00:00:00 2001 From: Albert Date: Sat, 25 May 2019 21:16:32 +0200 Subject: [PATCH 2/2] Add documentation on new data --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 28af99a..6d49853 100644 --- a/README.md +++ b/README.md @@ -1555,7 +1555,8 @@ guarantee that your application continues to function properly in the future. }, "template": "Forward", "cardId": 1498938915662, - "buttons": [1, 2, 3] + "buttons": [1, 2, 3], + "nextReviews": ["<1m", "<10m", "4d"] }, "error": null }