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

support click count by url instead of uuid

Open prof-milki opened this issue 4 years ago • 0 comments

type: feature request priority: low client: streamtuner2

The click counting should be able to recognize an {"url": …} parameter, instead of just handling stationuuids.

E.g., these two should be equivalent:

  • http://all.api.radio-browser.info/json/url/43f4f075-4591-11e8-8919-52543be04c81
  • http://all.api.radio-browser.info/json/url/byurl?url=http://12xu.stream.laut.fm/12xu…

My app doesn't initially store stationuuids when fetching radio lists. Thus requires a double roundtrip to vote on one station. There should be no need for clients to handle radiobrowser's database-internal identifiers. The API endpoint could easily (and faster) do the lookups itself.


Btw, there's also a minor typo/case mismatch in the /stations/byurl API doc. The parameter should be lowercase url, not URL. The returned value is also somewhat inconsistent. Perhaps it should always return a list, instead of just a hash for single entry results.

prof-milki avatar May 13 '20 18:05 prof-milki