Recently, I was trying to create a vocabulary list of all of the vocab tagged `#Food`, and was also previously trying to create a common 40k words schedule. In order to do this, I tasked my AI with drafting up a quick wrapper around Renshuu's API, and then had it write a script to search for all `#Food` words and create a study schedule.
A few problems arise, and I'll create separate forums threads for each. For this thread, I'll focus on the ability to add or remove terms from schedules. Currently, all update-focused APIs for schedules (across sentences, grammar, kanji, and vocabulary) lack the ability to affect multiple terms at once. Given my project, 40k terms at 2k requests per day would take nearly 20 days to complete! If I could just PUT a large handful of words at once (like I can via advanced search by hand), that'd solve my problem.
I suggest this as an alternative to simply attaching it to advanced search, as saying "please add terms matching these search terms to x schedule" is elegant for UX, but not great for APIs-- instead, give me terms matching XYZ; then I say later to add this list to my schedule is elegant for programming purposes, IMHO-- the search and effect are separated.
I suppose it depends on what XYZ is in your example. If it is options already available (or close) to the options in the current search endpoints, then it could be a
/search call
+
PUT call on the schedule, with an expanded argument for submitting multiple ids.
I am not the most knowledgeable when it comes to API conventions.
Currently, for words, you use /word/{id} (PUT) to add that word to a schedule or list. I get the feeling that we would not be able to reuse this for this purpose.
Instead, something like /schedule/{id} (PUT), accepting an array of ids to be added? Similar for /list/{id}, and of course, DELETE for removals. Would this work?