This feature works the same as creating or updating notes with tags.
So now with endpoints: POST /notes and PUT /notes/:id the notes object can have a 'notebooks' property, which will be an array of notebook objects. Any notebook objects that has an id will be assumed to already exist and will be assigned to the note. Any notebook without an id will be created and then assigned to the note.
If the note already had notebooks, the list you pass in will replace the existing notebook assignments. So if you pass in an empty array, that will remove the note from any notebooks it was in.
If you don't have a notebooks property, nothing will happen to any existing notebook assignments.
In any cases, if there are errors with the notebooks (for example if you try to create a new notebook without a name, or if you try to assign a notebook that does not exist), you will NOT get an error message. It will just quietly ignore the error.
This feature works the same as creating or updating notes with tags. So now with endpoints:
POST /notes
andPUT /notes/:id
the notes object can have a 'notebooks' property, which will be an array of notebook objects. Any notebook objects that has an id will be assumed to already exist and will be assigned to the note. Any notebook without an id will be created and then assigned to the note. If the note already had notebooks, the list you pass in will replace the existing notebook assignments. So if you pass in an empty array, that will remove the note from any notebooks it was in. If you don't have a notebooks property, nothing will happen to any existing notebook assignments. In any cases, if there are errors with the notebooks (for example if you try to create a new notebook without a name, or if you try to assign a notebook that does not exist), you will NOT get an error message. It will just quietly ignore the error.Makes sense?