Open perrotuerto opened 5 months ago
Eh, maybe? Should be an optional thing though, maybe to be enabled with a query param.
Thanks for the reply, @sissbruecker, may be something like:
GET /api/bookmarks/<id>/html/
I will like to help you with this!
Hmm, adding a separate endpoint seems a bit convoluted. If more options like these are added then you would end up with a large number of routes, plus combinations of those. I was thinking more about a query param to control this: GET /api/bookmarks/<id>/?notes_html
. Also wondering if this should work for the list endpoint as well.
Apart from that the markdown rendering logic should be extracted into a class maybe, so that it can be used in both the template tag and in the API serializer.
With the list? Do you mean the tags?
GET /api/bookmarks/<id>/?notes_html
that retrieves the HTML format of the notes by a new class for the markdown formatter sounds good to me. I will start to work with the development setup.
I wonder if it is possible to add a "notes_html" field to the api that reuses the shared render of bookmark.notes as its value. It would help to keep the same HTML structure across different services/uses.