Repository navigation
feat(address): Nominatim API - #117
Redstoner507 wants to merge 1 commit into
Conversation
Qodana for JVMIt seems all right 👌 No new problems were found according to the checks applied 💡 Qodana analysis was run in the pull request mode: only the changed files were checked Contact Qodana teamContact us at qodana-support@jetbrains.com
|
7455951 to
49f53df
Compare
…ser-Agent override to API function
49f53df to
a4e36d4
Compare
| + "&lat=" + coordinates.latitude() | ||
| + "&lon=" + coordinates.longitude() | ||
| + "&addressdetails=1" | ||
| + "&accept-language=en"; |
There was a problem hiding this comment.
Making that optional would be helpful. I would suggest that by default it uses local language and only with a flag uses en. If you have another suggestion/Opinion lmk
There was a problem hiding this comment.
For the flag you mean like in the command '/address get en' or without it use the player language?
There was a problem hiding this comment.
I thought about /address get --international - afaik Cloud Command Framework Support such flags.
If that is the en Language Part get added to the request, if not then it's send without that.
| + "&accept-language=en"; | ||
| ChatHelper.getStandardComponent(false, url); | ||
| String userAgent = BuildTeamTools.getInstance().getMainConfig().userAgent(); | ||
| API.getAsync(url, userAgent, new API.ApiResponseCallback() { |
There was a problem hiding this comment.
Requests are sent without shared rate limiting. Concurrent or repeated address lookups can exceed Nominatim’s public API limit of one request per second, leading to rejected requests or blocked access. Add server-wide throttling before sending requests; caching repeated lookups could also help
Address command – Part 2