Updating README.md
This commit is contained in:
parent
93011fc505
commit
6316e9e76f
85
README.md
85
README.md
@ -151,8 +151,8 @@ The following actions are currently supported:
|
|||||||
|
|
||||||
* `addNote`
|
* `addNote`
|
||||||
|
|
||||||
Creates a note for the given deck and model, with the provided field values and tags. Returns the identifier of the
|
Creates a note using the given deck and model, with the provided field values and tags. Returns the identifier of
|
||||||
created note created on success, and `null` on failure.
|
the created note created on success, and `null` on failure.
|
||||||
|
|
||||||
AnkiConnect can download audio files and embed them in newly created notes. The corresponding *audio* note member is
|
AnkiConnect can download audio files and embed them in newly created notes. The corresponding *audio* note member is
|
||||||
optional and can be omitted. If you choose to include it, the *url* and *filename* fields must be also defined. The
|
optional and can be omitted. If you choose to include it, the *url* and *filename* fields must be also defined. The
|
||||||
@ -166,21 +166,19 @@ The following actions are currently supported:
|
|||||||
params: {
|
params: {
|
||||||
deckName: 'Default',
|
deckName: 'Default',
|
||||||
modelName: 'Basic',
|
modelName: 'Basic',
|
||||||
note: {
|
fields: {
|
||||||
fields: {
|
Front: 'front content',
|
||||||
Front: 'front content',
|
Back: 'back content',
|
||||||
Back: 'back content',
|
/* ... */
|
||||||
/* ... */
|
},
|
||||||
},
|
tags: [
|
||||||
tags: [
|
'yomichan',
|
||||||
'yomichan',
|
/* ... */
|
||||||
/* ... */
|
],
|
||||||
],
|
audio: /* optional */ {
|
||||||
audio: /* optional */ {
|
url: 'https://assets.languagepod101.com/dictionary/japanese/audiomp3.php?kanji=猫&kana=ねこ',
|
||||||
url: 'https://assets.languagepod101.com/dictionary/japanese/audiomp3.php?kanji=猫&kana=ねこ',
|
filename: 'yomichan_ねこ_猫.mp3',
|
||||||
filename: 'yomichan_ねこ_猫.mp3',
|
skipHash: '7e2c2f954ef6051373ba916f000168dc'
|
||||||
skipHash: '7e2c2f954ef6051373ba916f000168dc'
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -190,6 +188,51 @@ The following actions are currently supported:
|
|||||||
```
|
```
|
||||||
null
|
null
|
||||||
```
|
```
|
||||||
|
|
||||||
|
* `addNotes`
|
||||||
|
|
||||||
|
Creates multiple notes using the given deck and model, with the provided field values and tags. Returns an array of
|
||||||
|
identifiers of the created notes (notes that could not be created will have a `null` identifier). Please see the
|
||||||
|
documentation for `addNote` for an explanation of objects in the `notes` array.
|
||||||
|
|
||||||
|
**Sample request**:
|
||||||
|
```
|
||||||
|
{
|
||||||
|
action: 'addNotes',
|
||||||
|
params: {
|
||||||
|
notes: [
|
||||||
|
{
|
||||||
|
deckName: 'Default',
|
||||||
|
modelName: 'Basic',
|
||||||
|
fields: {
|
||||||
|
Front: 'front content',
|
||||||
|
Back: 'back content',
|
||||||
|
/* ... */
|
||||||
|
},
|
||||||
|
tags: [
|
||||||
|
'yomichan',
|
||||||
|
/* ... */
|
||||||
|
],
|
||||||
|
audio: /* optional */ {
|
||||||
|
url: 'https://assets.languagepod101.com/dictionary/japanese/audiomp3.php?kanji=猫&kana=ねこ',
|
||||||
|
filename: 'yomichan_ねこ_猫.mp3',
|
||||||
|
skipHash: '7e2c2f954ef6051373ba916f000168dc'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
/* ... */
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
**Sample response**:
|
||||||
|
```
|
||||||
|
[
|
||||||
|
null,
|
||||||
|
/* ... */
|
||||||
|
]
|
||||||
|
```
|
||||||
|
|
||||||
* `canAddNotes`
|
* `canAddNotes`
|
||||||
|
|
||||||
Accepts an array of objects which define parameters for candidate notes (see `addNote`) and returns an array of
|
Accepts an array of objects which define parameters for candidate notes (see `addNote`) and returns an array of
|
||||||
@ -201,9 +244,9 @@ The following actions are currently supported:
|
|||||||
action: 'canAddNotes',
|
action: 'canAddNotes',
|
||||||
params: {
|
params: {
|
||||||
notes: [
|
notes: [
|
||||||
deckName: 'Default',
|
{
|
||||||
modelName: 'Basic',
|
deckName: 'Default',
|
||||||
note: {
|
modelName: 'Basic',
|
||||||
fields: {
|
fields: {
|
||||||
Front: 'front content',
|
Front: 'front content',
|
||||||
Back: 'back content',
|
Back: 'back content',
|
||||||
@ -213,7 +256,7 @@ The following actions are currently supported:
|
|||||||
'yomichan',
|
'yomichan',
|
||||||
/* ... */
|
/* ... */
|
||||||
]
|
]
|
||||||
}
|
},
|
||||||
/* ... */
|
/* ... */
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user