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

Include country ISO code in response, not just english name #43

Closed
leaumar opened this issue Jan 27, 2018 · 4 comments
Closed

Include country ISO code in response, not just english name #43

leaumar opened this issue Jan 27, 2018 · 4 comments

Comments

@leaumar
Copy link

leaumar commented Jan 27, 2018

I'd like to request the country ISO code to be included in the json response, not only the english name of the country, if possible. I assume you actually get the ISO code from your database but then translate it to the english name with a lookup... If not, I guess this request isn't valid.

The reason for this is that a country is uniquely identified with an ISO code, and that's the system that's used in lookups like country-to-flag services. An ISO code is much easier and safer for an API consumer to work with than a localized name.

{
	"ip": "foo",
	"ip_decimal": 0,
	"country": "Belgium",
	"isoCountry": "BE",
	"city": "Unknown",
	"hostname": "isp.internet"
}
@mpolden
Copy link
Owner

mpolden commented Feb 9, 2018

Fixed by #45.

@mpolden mpolden closed this as completed Feb 9, 2018
@leaumar
Copy link
Author

leaumar commented Feb 9, 2018

Whenabouts will this change be deployed on ifconfig.co?

Thanks btw

@mpolden
Copy link
Owner

mpolden commented Feb 9, 2018

Now.

@leaumar
Copy link
Author

leaumar commented Feb 9, 2018

Working beautifully, thanks 👍

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