Compare commits
No commits in common. "0514569621f428835c3da6894727ba5e2c5af864" and "f52e0c2e24cadf9dd632fb31351c0ccae80ac7a4" have entirely different histories.
0514569621
...
f52e0c2e24
70
README.md
70
README.md
@ -2132,33 +2132,6 @@ Search parameters are passed to Anki, check the docs for more information: https
|
||||
```
|
||||
</details>
|
||||
|
||||
#### `getActiveProfile`
|
||||
|
||||
* Retrieve the active profile.
|
||||
|
||||
<details>
|
||||
<summary><i>Sample request:</i></summary>
|
||||
|
||||
```json
|
||||
{
|
||||
"action": "getActiveProfile",
|
||||
"version": 6
|
||||
}
|
||||
```
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary><i>Sample result:</i></summary>
|
||||
|
||||
```json
|
||||
{
|
||||
"result": "User 1",
|
||||
"error": null
|
||||
}
|
||||
```
|
||||
</details>
|
||||
|
||||
|
||||
#### `loadProfile`
|
||||
|
||||
* Selects the profile specified in request.
|
||||
@ -4174,8 +4147,8 @@ Search parameters are passed to Anki, check the docs for more information: https
|
||||
|
||||
#### `notesInfo`
|
||||
|
||||
* Returns a list of objects containing for each note ID the note fields, tags, note type, modification time,the cards belonging to
|
||||
the note and the profile where the note was created.
|
||||
* Returns a list of objects containing for each note ID the note fields, tags, note type and the cards belonging to
|
||||
the note.
|
||||
|
||||
<details>
|
||||
<summary><i>Sample request:</i></summary>
|
||||
@ -4199,49 +4172,12 @@ Search parameters are passed to Anki, check the docs for more information: https
|
||||
"result": [
|
||||
{
|
||||
"noteId":1502298033753,
|
||||
"profile": "User_1",
|
||||
"modelName": "Basic",
|
||||
"tags":["tag","another_tag"],
|
||||
"fields": {
|
||||
"Front": {"value": "front content", "order": 0},
|
||||
"Back": {"value": "back content", "order": 1}
|
||||
},
|
||||
"mod": 1718377864,
|
||||
"cards": [1498938915662]
|
||||
}
|
||||
],
|
||||
"error": null
|
||||
}
|
||||
```
|
||||
</details>
|
||||
s
|
||||
#### `notesModTime`
|
||||
|
||||
* Returns a list of objects containings for each note ID the modification time.
|
||||
|
||||
<details>
|
||||
<summary><i>Sample request:</i></summary>
|
||||
|
||||
```json
|
||||
{
|
||||
"action": "notesModTime",
|
||||
"version": 6,
|
||||
"params": {
|
||||
"notes": [1502298033753]
|
||||
}
|
||||
}
|
||||
```
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary><i>Sample result:</i></summary>
|
||||
|
||||
```json
|
||||
{
|
||||
"result": [
|
||||
{
|
||||
"noteId": 1498938915662,
|
||||
"mod": 1629454092
|
||||
}
|
||||
}
|
||||
],
|
||||
"error": null
|
||||
|
@ -456,10 +456,7 @@ class AnkiConnect:
|
||||
@util.api()
|
||||
def getProfiles(self):
|
||||
return self.window().pm.profiles()
|
||||
|
||||
@util.api()
|
||||
def getActiveProfile(self):
|
||||
return self.window().pm.name
|
||||
|
||||
|
||||
@util.api()
|
||||
def loadProfile(self, name):
|
||||
@ -1699,11 +1696,9 @@ class AnkiConnect:
|
||||
|
||||
result.append({
|
||||
'noteId': note.id,
|
||||
'profile': self.window().pm.name,
|
||||
'tags' : note.tags,
|
||||
'fields': fields,
|
||||
'modelName': model['name'],
|
||||
'mod': note.mod,
|
||||
'cards': self.collection().db.list('select id from cards where nid = ? order by ord', note.id)
|
||||
})
|
||||
except NotFoundError:
|
||||
@ -1715,23 +1710,6 @@ class AnkiConnect:
|
||||
|
||||
return result
|
||||
|
||||
@util.api()
|
||||
def notesModTime(self, notes):
|
||||
result = []
|
||||
for nid in notes:
|
||||
try:
|
||||
note = self.getNote(nid)
|
||||
result.append({
|
||||
'noteId': note.id,
|
||||
'mod': note.mod
|
||||
})
|
||||
except NotFoundError:
|
||||
# Anki will give a NotFoundError if the note ID does not exist.
|
||||
# Best behavior is probably to add an 'empty card' to the
|
||||
# returned result, so that the items of the input and return
|
||||
# lists correspond.
|
||||
result.append({})
|
||||
return result
|
||||
|
||||
@util.api()
|
||||
def deleteNotes(self, notes):
|
||||
|
Loading…
Reference in New Issue
Block a user