segler-alex / radiobrowser-api

radio browser server api
GNU Affero General Public License v3.0
72 stars 15 forks source link

Allow fetching metadata of multiple stations simultaneously #40

Open atomblender opened 6 years ago

atomblender commented 6 years ago

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

Bitti09 commented 5 years ago

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