andreztz / pyradios

Client for the Radio Browser API
https://api.radio-browser.info/
MIT License
62 stars 22 forks source link

Any call to discover stations by country or state name? #30

Closed deep5050 closed 3 years ago

deep5050 commented 3 years ago

It will be great if there is a way to discover stations by country name or state name!

or is there already?

andreztz commented 3 years ago

Yes it is possible, first you must get the list of country/state available

>>> from pyradios import RadioBrowser
>>> rb = RadioBrowser()
>>> rb.states()
>>> rb.countries()
>>> rb.countrycodes()

So to get the list of radio stations we have the following methods

>>> rb.stations_by_state('West Bengal')
>>> rb.stations_by_countrycode('IN')