beefweb icon indicating copy to clipboard operation
beefweb copied to clipboard

API-Docs: `query/updates`

Open shtrophic opened this issue 2 years ago • 2 comments

Hi, I was just noticing that the swagger-api does not mention the query/updates endpoint. Mind adding that?

shtrophic avatar Feb 25 '23 17:02 shtrophic

Hi,

last time I checked Swagger/OpenAPI didn't support server sent events.

/api/query/updates is the same as /api/query, but returns text/event-stream.

An event is sent every time something is changed.

Each event is structured exactly like /api/query response.

player, playlists, playlistItems updates might be sent in a single or in multiple events.

If only player part is changed it won't send playlists and so on.

Periodically server sends empty event to keep connection alive.

hyperblast avatar Feb 25 '23 18:02 hyperblast

Thanks!

shtrophic avatar Feb 25 '23 19:02 shtrophic