Skip to content

feat(address): Nominatim API - #117

Open
Redstoner507 wants to merge 1 commit into
mainfrom
address-command
Open

Redstoner507 wants to merge 1 commit into
mainfrom
address-command

Conversation

@Redstoner507

Copy link
Copy Markdown
Member

Address command – Part 2

  • Switch the reverse geocoding implementation of the get subcommand from the Photon API to the Nominatim API.
  • Add support for configuring user agents for APIs (required by the Nominatim API).
  • Keep the old Photon implementation for now; it is not removed in this PR.

@Redstoner507
Redstoner507 requested a review from Zoriot October 20, 2026 15:31
@github-actions

github-actions Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

Qodana for JVM

It 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
☁️ View the detailed Qodana report

Contact Qodana team

Contact us at qodana-support@jetbrains.com

@Redstoner507
Redstoner507 force-pushed the address-command branch 2 times, most recently from 7455951 to 49f53df Compare October 22, 2026 07:56
@Redstoner507
Redstoner507 marked this pull request as ready for review October 22, 2026 08:08
+ "&lat=" + coordinates.latitude()
+ "&lon=" + coordinates.longitude()
+ "&addressdetails=1"
+ "&accept-language=en";

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the flag you mean like in the command '/address get en' or without it use the player language?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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() {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

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

Successfully merging this pull request may close these issues.

2 participants