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 new action: answerCards #390

Closed antistic closed 1 year ago

antistic commented 1 year ago

fixes #148

might address #386

thanks for the plugin :)

FooSoft commented 1 year ago

Thanks for the PR! Could you make it so that instead of having two parallel lists, the API instead takes a single list of objects that have a cardId and answer value? That will be more robust than trying to make sure that the lists are always have the same # of elements and are lining up correctly.

antistic commented 1 year ago

Sure, I initially did it that way to match with setEaseFactors and setSpecificValueOfCard but you're right a list of objects makes it easier. By objects do you means like [[123, 1], [345, 2]] or [{123: 1}], {345: 2}] or [{cardId: 123, answer: 1}, {cardId: 345, answer: 2}]?

antistic commented 1 year ago

i went with the last one but called it "ease" since that matches the anki code, though i'm happy to change it to "button" or something else

FooSoft commented 1 year ago

Looks good to me!