radiobrowser-api icon indicating copy to clipboard operation
radiobrowser-api copied to clipboard

Allow fetching metadata of multiple stations simultaneously

Open atomblender opened this issue 7 years ago • 1 comments

Hi, currently it is not possible to fetch metadata of a set of stations in a single request. This would be useful for updating stations' metadata by client applications. For example if I have 100 favorite stations in my application I might want to update all their data from time to time.

Currently this is not possible without 2 workarounds:

  1. Get metadata for each station in a separate request, e.g.: http://www.radio-browser.info/webservice/json/stations/byid/12345
  2. Get metadata of all radio stations: http://www.radio-browser.info/webservice/json/stations

Both workarounds are ineffective. In the first case I will have to generate a lot of requests and then process them separately (same problem for the server). In the second case I will have to download a lot of data (~10 MB, ~18000 stations) just to extract 100 entries.

I think a preferred solution would probably be a post request where I can specify a list of station IDs.

I hope you this issue can be fixed somehow. Thanks

atomblender avatar Feb 24 '18 22:02 atomblender

With normal REST Api like this here, you can't do it in an efficient way.

A good alternative way would be a GraphQL wrapper. https://radio.mybitti.de/playground is my current experiment with such a wrapper

Bitti09 avatar Jan 14 '19 12:01 Bitti09