countries-states-cities-database icon indicating copy to clipboard operation
countries-states-cities-database copied to clipboard

The restful api not display the coordinates attached

Open 5ylvino opened this issue 2 years ago • 3 comments

Is there a proper way of call the api to display the full details on each country down to their are coordinates, which is very important to me along their names?

##currently from restful api

[
    {
        "id": 1,
        "name": "Afghanistan",
        "iso2": "AF"
    },

##expected

[ {
	"isoCode": "IN",
	"name": "India",
	"phonecode": "91",
	"flag": "🇮🇳",
	"currency": "INR",
	"latitude": "20.00000000",
	"longitude": "77.00000000",
	"timezones": [
		{
			"zoneName": "Asia\/Kolkata",
			"gmtOffset": 19800,
			"gmtOffsetName": "UTC+05:30",
			"abbreviation": "IST",
			"tzName": "Indian Standard Time"
		}
	]
}

5ylvino avatar Jul 28 '22 17:07 5ylvino

i guess i have seen it that i have to call them individual to get the detail afterwards. Thanks

5ylvino avatar Jul 28 '22 17:07 5ylvino

I discovered that of the city details on coordinates are not display and there is no sample on how to get it on the doc

5ylvino avatar Jul 28 '22 17:07 5ylvino

@5ylvino Yes, you're correct that I am not showing coordinates on city API. For 2 reasons

  1. Since cities request spits a lot of data, so to make it lightweight have only added basic info to API.
  2. Reason I have not added city details API is people start leeching the data making server hung up!

Even if I add it in near future, I will make that route paid.

dr5hn avatar Jul 29 '22 06:07 dr5hn