From 150c49d273889554782b4ac17e8fff09a757b1da Mon Sep 17 00:00:00 2001 From: ReneBrals Date: Tue, 9 Jan 2018 18:40:07 +0100 Subject: [PATCH] Updated README to include notesInfo and cardsInfo --- README.md | 86 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 86 insertions(+) diff --git a/README.md b/README.md index 6e1c676..3b45ecf 100644 --- a/README.md +++ b/README.md @@ -1065,6 +1065,92 @@ guarantee that your application continues to function properly in the future. } ``` +* **cardsInfo** + + Returns a list of objects containing for each card ID the card fields, front and back sides including CSS, note type, the note that the card belongs to, and deck name, as well as ease and interval. + + *Sample request*: + ```json + { + "action": "cardsInfo", + "version": 5, + "params": { + "cards": [1498938915662, 1502098034048] + } + } + ``` + + *Sample result*: + ```json + { + "result": [ + { + "answer": "back content", + "question": "front content", + "deckName": "Default", + "modelName": "Basic", + "fieldOrder": 1, + "fields": { + "Front": {"value": "front content", "order": 0}, + "Back": {"value": "back content", "order": 1} + }, + "css":"p {font-family:Arial;}", + "cardId": 1498938915662, + "interval": 16 + "note":1502298033753 + }, + { + "answer": "back content", + "question": "front content", + "deckName": "Default", + "modelName": "Basic", + "fieldOrder": 0, + "fields": { + "Front": {"value": "front content", "order": 0}, + "Back": {"value": "back content", "order": 1} + }, + "css":"p {font-family:Arial;}", + "cardId": 1502098034048, + "interval": 23 + "note":1502298033753 + } + ], + "error": null + } + ``` + +* **notesInfo** + + Returns a list of objects containing for each note ID the note fields, tags, note type and the cards belonging to the note. + + *Sample request*: + ```json + { + "action": "notesInfo", + "version": 5, + "params": { + } + } + ``` + + *Sample result*: + ```json + { + "result": [ + { + "noteId":1502298033753, + "modelName": "Basic", + "tags":['tag','another_tag'] + "fields": { + "Front": {"value": "front content", "order": 0}, + "Back": {"value": "back content", "order": 1} + }, + } + ], + "error": null + } + ``` + #### Media File Storage #### * **storeMediaFile**