I came across a few issues when I was about to write a plugin.
First I wanted to let users specify the folder id, since names are not unique, but then I've noticed there's no way to actually get the folder id from the Joplin UI. Thus people can't enter (copy/paste) a folder id.
Then I thought I could work around it by creating a folder with a specific id, and then people could rename and move the folder however they please.
But here's the next problem: I cannot create a folder with a specific id. At least not that I can see. The plugin api says it's based on the rest api and there it's not possible.
Another thing which seems to be impossible is to create a folder with name
XYZ and retrieve the id of that created folder. The post method does not return an object. Or at least I can't see that in the docs.
Once again, if there's already a folder called
XYZ, a subsequent search for
XYZ to retrieve the id could return the wrong folder.
So now I'm stuck. With neither of those 3 things, I can't create the plugin. Or at least the result would be undefined.
Does anyone have an idea how to proceed?