-
Notifications
You must be signed in to change notification settings - Fork 222
Add getNoteTags, updateNoteTags and updateNote #370
Conversation
getNoteTags returns [str ...] of tags for a given note (note: int) updateNoteTags removes the existing tags and sets new tags updateNote combines the old updateNoteFields and the new updateNoteTags Closes FooSoft#369
@FooSoft Ready for review, thanks for your feedback! Besides the docs and the tests, I made updateNote work with either tags or fields and fail when neither is provided. Doing multiple things does mean that an earlier one failing stops the latter things from happening - tried to reflect this in the docs. Hierarchical tags |
Hey @introt, I'm not Foosoft but I'm going to take a wild guess and say that On a side note, I also had to scrap a bit of work myself since I didn't realize |
Hi @Aquafina-water-bottle, thanks for your comment/review. I agree that the current implementation isn't optimal - a Imo the ideal API would have a "canonical" Unlike a I'd even go as far as implement a Looking forward to hearing your opinions on these! {
"id": 1514547547030
"deckName": "Default",
"modelName": "Basic",
"fields": {
"Front": "front content",
"Back": "back content"
},
"tags": [
"yomichan"
],
...
} Footnotes
|
@introt apologies for the delayed review, had to deal with IRL things. I like your changes, I believe that a certain amount of redundancy is fine in this case. AnkiConnect API isn't the paragon of beauty and has grown "organically" over the years. I think There are some merge conflicts, if you could fix them I will get this merged in ASAP. |
getNoteTags returns [str ...] of tags for a given note (note: int)
updateNoteTags removes the existing tags and sets new tags
updateNote combines the old updateNoteFields and the new updateNoteTags
Closes #369