selfoss
selfoss copied to clipboard
sources api inconsistency
Calling /sources return the list of the sources and the list of the spouts rather than only the list of sources. Not a big deal, but I'll write it down...
That’s right, there are many undocumented API endpoints used by the JavaScript client that do not really follow REST and combine multiple types of objects as an optimization.
But now that we have HTTP 2 with multiplexing support so that kind of optimization should be less necessary and and I might end up removing it in favour of two requests to GET /sources/list
and GET /sources/spouts
. So I would not rely on the undocumented endpoints unless absolutely necessary.
Though I am not sure how well handling multiple requests at the same time is supported it is on the PHP side – I have seen in the past that POST /update
would prevent all other requests from finishing. But that might be an Apache or SQLite limitation. Will need to do more testing and performance measurements.