Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The value returned by radioBrowser.listCountries() is not easy to use #123

Closed
ChildProdigy opened this issue Jul 29, 2024 · 2 comments
Closed
Assignees

Comments

@ChildProdigy
Copy link

This is the format returned by this API "key = value"
Papua New Guinea = 1
Cambodia = 2
Paraguay = 50
Kazakhstan = 51

But most of your APIs require ISO 3166-1 country code.
For example:
China -> CN
List stations = rb.listStationsBy(Paging.at(0, 10), SearchMode.BYCOUNTRYCODEEXACT, "CN");

After checking, the official should provide the ISO 3166-1 country code directly.
https://de1.api.radio-browser.info/#List_of_countries

@sfuhrm sfuhrm self-assigned this Aug 18, 2024
@sfuhrm
Copy link
Owner

sfuhrm commented Aug 18, 2024

Thanks for the issue. The HTTP-API changed a bit, all plaintext country fields are deprecated and replaced by countrycode which is ISO 3166-1. I didn't check the library according to this change, especially the listCountries() call.

Thinking about your issue, I see the improvement to add another call called listCountryCodes() which would suit to the new nomenclature of the HTTP API, and deprecate the listCountries() call.

sfuhrm added a commit that referenced this issue Aug 18, 2024
…f country fields in favor of countrycode fields in HTTP API #123
@sfuhrm
Copy link
Owner

sfuhrm commented Aug 18, 2024

Fixed in master according to the description above.

@sfuhrm sfuhrm closed this as completed Aug 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants