feat: add missing PlusAnonymous fields and fix PlusMobile#73
Open
rbarrielabrystech wants to merge 1 commit intoipinfo:masterfrom
Open
feat: add missing PlusAnonymous fields and fix PlusMobile#73rbarrielabrystech wants to merge 1 commit intoipinfo:masterfrom
rbarrielabrystech wants to merge 1 commit intoipinfo:masterfrom
Conversation
PlusAnonymous: add IsResProxy, LastSeen, and PercentDaysSeen fields to match the IPinfo Max /lookup API response. These fields provide residential proxy detection and anonymiser recency/frequency signals that were previously silently dropped during JSON unmarshaling. PlusMobile: replace incorrect Name field with CountryCode to match the actual API response schema (the mobile object returns mcc, mnc, and country_code — not name). Update lookup-plus example to demonstrate the new fields. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
IsResProxy,LastSeen, andPercentDaysSeenfields to match the IPinfo Max/lookupAPI responseNamefield withCountryCodeto match actual API response schemaContext
The IPinfo Max
/lookupendpoint returns these fields in theanonymousobject:{ "anonymous": { "is_proxy": false, "is_relay": false, "is_tor": false, "is_vpn": true, "is_res_proxy": true, "name": "NetNut", "last_seen": "2026-03-12", "percent_days_seen": 100 } }The current
PlusAnonymousstruct only captures 5 of these 8 fields. The missing fields (is_res_proxy,last_seen,percent_days_seen) are silently dropped during JSON unmarshaling.Similarly,
PlusMobile.Namedoesn't exist in the API response — the actual field iscountry_code.Changes
ipinfo/plus.go: Added 3 new fields toPlusAnonymous, replacedNamewithCountryCodeinPlusMobileexample/lookup-plus/main.go: Updated example to demonstrate the new fieldsTesting
go build ./...passes cleanlyPlusAnonymous;PlusMobile.Name→.CountryCodeis a correctness fix (Name was always empty)