Comments (7)
Hello @Arlind-Prosperoware
the rest api is this one,
http://api.geonames.org/countryInfoJSON?formatted=true&lang=en&username=${YOUR_USERNAME}&style=full
replace ${YOUR_USERNAME} with your username, you will get the json response. If something is wrong in the payload you should contact geonames directly, they have a dedicated forum here:
http://forum.geonames.org/
from geonames.js.
Hi @kinotto , The issue seems to be resolved now. There are no more duplicate countries.
Thanks.
from geonames.js.
great @Arlind-Prosperoware :)
from geonames.js.
Hello @kinotto ,
When I'm using the example code to get all the countries this is the REST API that is being invoked:
https://secure.geonames.org/countryInfoJSON?username=prosperoware&lang=en
and this API is returning duplicates.
The API that you mentioned is returning the correct format but its not the API thats being called by the code.
from geonames.js.
Hi @Arlind-Prosperoware ,
are you using the commercial tier? did you pass a token in the config object? try to avoid passing the token and see if you still get duplicates.
Anyways if you get duplicates you might ask directly in the geonames forum probably they can better address the problem and probably solve it :)
from geonames.js.
Im not sending the token at all and I'm not using the commercial tier.
This is my config:
{username: name, lan:'en', encoding:'JSON'}
https://secure.geonames.org/countryInfoJSON?username=username&lang=en
This API request is returning duplicates and is not returning all the data.
http://api.geonames.org/countryInfoJSON?formatted=true&lang=en&username=username&style=full
This API request is returning the correct data without duplicates
from geonames.js.
As i told you the payload of the response is not under my control, and i cannot filter the data in the library cause it wouldn't be the correct solution the purpose of this library is just to wrap their service into a js module.
When you say duplicates i don't know at which countries you're referring to because i cannot find them, but a part from that if there is a bug in the service it is correct to raise it in order to make them fix it :)
from geonames.js.
Related Issues (15)
- Access-Control-Allow-Origin HOT 7
- Vulnerability issues HOT 3
- Suggestion for v2.0 (ES6+ version) HOT 3
- Cannot read property 'create' of undefined HOT 3
- docs: potentially a note about importing into a TSX app? HOT 4
- You may need an appropriate loader to handle this file type HOT 1
- Doesn't work with import es module HOT 2
- 401 response (user does not exist) HOT 3
- GeocodeAddress doesn't exists HOT 2
- Cannot enter multiple featureCodes HOT 4
- Anyway to cache results? HOT 1
- 401 Error HOT 2
- Geonames is not a function HOT 1
- Any new update to this project?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from geonames.js.