baudren / NoteOrganiser

Scientific Note Taking
MIT License
13 stars 6 forks source link

Create a separate API for the actual processing of modified markdown #80

Open baudren opened 8 years ago

baudren commented 8 years ago

Right now, the code is a bit tangled between the PySide part and the actual manipulation of the notes. It would be great to separate them as much as possible, so as to wrap the back-end into a python module, which could be used independently - for instance, as a Django app.

For this to happen, we need to define exactly what the API should do: should it store the tags, for instance?

More or less, the noteorganiser/text_processing.py already encompasses some of it, but some is also spread in noteorganiser/frames.py.

baudren commented 8 years ago

So, let's get this started. I'll try to list every type of interaction we might want, and see if we can cover everything

TODO:

Verb End Point Description
GET /settings/root_folder
POST /settings/root_folder change the root_folder
GET /notebooks List of all notebooks, with path
POST /notebooks Create a new notebook
GET /notebooks/12 Return all posts of notebook 12
PATCH /notebooks/12 {"op": "replace", "path": "/name", "value": "new name"} Update notebook 12's name
DELETE /notebooks/12 Delete the notebook 12
GET /notebooks/12/entries Get all entries in notebook 12
POST /notebooks/12/entries Add a new entry in notebook 12
GET /notebooks/12/entries/2 Get the entry 2 in notebook 12
PUT /notebooks/12/entries/2 Modify entry 2 in notebook 12
DELETE /notebooks/12/entries/2 Delete ...
GET /notebooks/12/tags Get all tags from notebook 12
GET /notebooks/12/entries/2/tags Get all tags from entry 2 in notebook 12
GET /notebooks/12/entries/2/tags/1 ...
PUT /notebooks/12/entries/2/tags/1 Modify the tag
DELETE /notebooks/12/entries/2/tags/1 Delete the tag
GET /tags Return all tags with their respective number count and notebook/entry reference
GET /tags/12 Return tag 12
PUT /tags/12 Modify the tag, in all the files where it appears!!!