Updated README to include notesInfo and cardsInfo

This commit is contained in:
ReneBrals 2018-01-09 18:40:07 +01:00
parent 2d051c67c1
commit 150c49d273

View File

@ -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**