Skip to content

Add IPinfo Lite service #1686

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

Merged
merged 3 commits into from
Jun 3, 2025
Merged

Conversation

iltempo
Copy link
Contributor

@iltempo iltempo commented Jun 1, 2025

IPinfo recently added a Lite service that allows unlimited free IP lookups on the country level. This PR adds support for that service.

The results do not contain location information. This is why some tests are skipped.

@abdullahdevrel
Copy link

Thank you very much! We really appreciate it.

We were hoping that someday people would help us bring our Lite DB to a geocoder, but we lack Ruby experts on our team. So, we genuinely appreciate you taking the time and writing the code to bring the Lite API to the project. Thanks!

— Abdullah | DevRel, IPinfo

@iltempo
Copy link
Contributor Author

iltempo commented Jun 2, 2025

@abdullahdevrel, you are welcome. Considering the other open PRs, it may take some time for this to receive feedback or even get merged.

Is your request about LITE DB related to the "ancient" PR #1324?

@alexreisner
Copy link
Owner

This looks like a great service. And thank you for the clean, easy-to-review PR. Everything looks good except that the methods in lib/geocoder/results/ipinfo_io_lite.rb appear to be defined twice. You should either define them explicitly or loop through response_attributes and define them dynamically. Can you fix that and I'll merge?

@iltempo
Copy link
Contributor Author

iltempo commented Jun 3, 2025

Thank you for the quick review and the feedback @alexreisner. I fixed the PR and added some general information about the service to a readme file, which I did not spot in the first place.

@alexreisner
Copy link
Owner

Excellent. This looks great. Thanks!

@alexreisner alexreisner merged commit 66987e1 into alexreisner:master Jun 3, 2025
5 checks passed
@abdullahdevrel
Copy link

@iltempo

Is your request about LITE DB related to the "ancient" PR #1324?

Oh no. That company is not us.

I was referring to this request: #1632

However, instead of the IP to Country ASN database, it should now be the IPinfo Lite Database. We have changed the schema for it.

https://ipinfo.io/developers/ipinfo-lite-database

The implementation would be similar to MaxMind's MMDB-based implementation because our data also comes in MMDB format.

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.

3 participants