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

some countries has no cites #48

Closed
Kenan-Hussein opened this issue Mar 19, 2021 · 6 comments · Fixed by #53
Closed

some countries has no cites #48

Kenan-Hussein opened this issue Mar 19, 2021 · 6 comments · Fixed by #53
Assignees
Labels
bug Something isn't working

Comments

@Kenan-Hussein
Copy link

Kenan-Hussein commented Mar 19, 2021

Using https://countriesnow.space/api/v0.1/countries/positions
return some countries name in a different way when using this :
https://countriesnow.space/api/v0.1/countries/info?returns=name

Example:
/positions response: syria as "Syrian Arab Republic"
/info?returns=name response: "Syria"

Using "Syrian Arab Republic" as post request to get its cities return nothing, but when using "Syria" it works, the problem I need to use positions to get lat and long also to get a country name to get it cities.

I noticed there are some other countries that have the same issue.

@MartinsOnuoha
Copy link
Owner

Hi, @Kenan-Hussein I think I understand your issues, this is happening because of the difference in the data source, do you think you can help identify any other country with this problem?

@MartinsOnuoha MartinsOnuoha added the bug Something isn't working label Mar 21, 2021
@Kenan-Hussein
Copy link
Author

@MartinsOnuoha Well.. that took some time but glad to help

Here is your list:

Syrian Arab Republic
Brunei Darussalam
British Indian Ocean Territory
Bouvet Island
Cape Verde
Christmas Island
Cocos (Keeling) Islands
Cook Islands
Falkland Islands (Malvinas)
French Guiana
Gibraltar
Guernsey
Heard Island and McDonald Islands
Holy See (Vatican City State)
Jersey
Lao People's Democratic Republic
Macao
Marshall Islands
Monaco
Montserrat
Myanmar
Nauru
Niger
Niue
Norfolk Island
Northern Mariana Islands
Palau
Pitcairn
Saint Kitts and Nevis
Réunion
Saint Lucia
Saint Pierre and Miquelon
Saint Vincent and the Grenadines
Sao Tome and Principe
Sierra Leone
Serbia
South Georgia and the South Sandwich Islands
Tajikistan
Timor-Leste
Tokelau
Tuvalu
Turks and Caicos Islands
United States Minor Outlying Islands
Wallis and Futuna
Viet Nam

@MartinsOnuoha
Copy link
Owner

Thanks a lot @Kenan-Hussein , I'll get to work on fixing up these data, and raise a PR for it

@Kenan-Hussein
Copy link
Author

still not working can you please fix Syrian Arab Republic at less please

@MartinsOnuoha
Copy link
Owner

Hey @Kenan-Hussein apologies, I've been trying to validate some of these countries and making sure their names haven't changed, yet, expect a fix today.

MartinsOnuoha added a commit that referenced this issue May 30, 2021
unifies country names across model files

Closes #48
@MartinsOnuoha
Copy link
Owner

@Kenan-Hussein
Some of these places with the issue are mostly archipelagos and less populated areas and have no cities, so you might still get an empty array for those requests, but the "Not found error" and other issues related to the listed countries should be resolved now.

MartinsOnuoha added a commit that referenced this issue May 30, 2021
* 🐛 (model) unifying country names

unifies country names across model files

Closes #48

* 🐛 (countryAndCities.js) adds norfolk island

* adds Palau

* adds sao tome

* adds seirra leonne, refactor getCitiesByCountry func

* adds wallis and futuna

* fix vietnam
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants