segler-alex / radiobrowser-api-rust

radio-browser API implementation in rust
GNU Affero General Public License v3.0
230 stars 96 forks source link

Where can I add a term in Advanced station search #120

Closed shinokada closed 3 years ago

shinokada commented 3 years ago

Advanced station search says:

A list of radio stations that match the search. It will search for the station whose attribute contains the search term. And the example is http://de1.api.radio-browser.info/json/stations/search.

Where can I add a search term? I tried http://de1.api.radio-browser.info/json/stations/search/jazz but no results returned.

The same thing for Search radio stations by UUID and Search radio stations by URL. Where can I add a search term?

s-n-g commented 3 years ago

At the begining of the page:

Please note that all the parameters listed below can be added by using an HTTP POST request with the encoding "x-www-form-urlencoded" instead of GET request, and they can also be sent with encoding "application/json" used by Angular.js, for example.

shinokada commented 3 years ago

Thanks. This works.

curl -X POST -d 'name=jazz' -d 'countrycode=AU' http://91.132.145.114/json/stations/search
# or
curl -X POST -H "Content-Type: application/json" -d '{"tag":"jazz","countrycode":"au","state":"queensland"}' http://91.132.145.114/json/stations/search