fossar / selfoss

multipurpose rss reader, live stream, mashup, aggregation web application
https://selfoss.aditu.de
GNU General Public License v3.0
2.35k stars 343 forks source link

sources api inconsistency #1378

Open davidoskky opened 1 year ago

davidoskky commented 1 year ago

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...

jtojnar commented 1 year ago

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.