hyperblast / beefweb

Web interface plugin for DeaDBeeF and foobar2000 players
MIT License
244 stars 31 forks source link

API-Docs: `query/updates` #242

Open Sir-Photch opened 1 year ago

Sir-Photch commented 1 year ago

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

hyperblast commented 1 year ago

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.

Sir-Photch commented 1 year ago

Thanks!