FooSoft / anki-connect

Anki plugin to expose a remote API for creating flash cards.
https://foosoft.net/projects/anki-connect/
Other
1.92k stars 218 forks source link

Add getNoteTags, updateNoteTags and updateNote #369

Closed introt closed 1 year ago

introt commented 1 year ago

Before writing README docs, are these ok? This updateNoteTags implementation is quite wasteful, but doing it like replaceTags kept not deleting tags.

getNoteTags returns [str ...] of tags for a given note (nid: int)

updateNoteTags removes the existing tags and sets new tags

updateNote combines the old updateNoteFields and the new updateNoteTags

I'd love to have these included, as implementing these client side requires a bunch of API calls. Will redo commit msg when adding docs.

FooSoft commented 1 year ago

I don't see any problems with this. For better or worse, the AnkiConnect API has evolved organically based on specific requirements, so there are some holes like this. Let me know when PR is ready and I'll merge it in.

introt commented 1 year ago

Closed in favor of #370