You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 6d1d95c
Browse filesBrowse the repository at this point in the historyBrowse files
Add is_satellite, is_anycast and blocklist first/last/days seen fields
The API now flags satellite ISP addresses (is_satellite) and anycast
addresses (is_anycast) next to is_eu, sending each key only when it is
true, and every threat.blocklists entry may carry first_seen and
last_seen (YYYY-MM-DD, UTC) and days_seen; some feeds, such as ipdata's
own vpn feed, omit all three.
IpdataModel gains primitive booleans mapped like is_eu (isSatellite(),
isAnycast()) that read false when the key is absent. Blocklist gains
nullable String firstSeen/lastSeen and Integer daysSeen; the dates stay
strings (no new dependency, no format coupling). IpdataField gains
IS_SATELLITE and IS_ANYCAST for getFields(...), and the single-field
service methods isSatellite(ip) and isAnycast(ip) follow the existing
GET /{ip}/{field} pattern. The Jackson decoder already ignores unknown
properties (FAIL_ON_UNKNOWN_PROPERTIES is false); a test now covers it.
Tests: fixtures built from the API samples (98.97.34.0 satellite ISP,
8.8.8.8 extended with is_anycast and two dated blocklist entries,
187.13.250.1 VPN exit whose third blocklist entry has no dates);
NewResponseFieldsTest asserts the typed values, the false-when-absent
behaviour, the single-field endpoints, field selection with the new
names, bulk responses and unknown-key tolerance, with and without the
cache. The README documents the five fields and the new methods.
Claude-Session: https://claude.ai/code/session_01VQiRp4zEJKUXHrKkFaeUke
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: README.md
+11Lines changed: 11 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -144,6 +144,14 @@ Output:
144
144
}
145
145
```
146
146
147
+
The following fields were added to the API responses recently and are mapped by the model (every other field is described in the [API reference](https://docs.ipdata.co/api-reference/response-fields)):
148
+
149
+
-`is_satellite` – `model.isSatellite()`: the address belongs to a satellite ISP. The API sends the key only when it is `true`; the model reads `false` when it is absent.
150
+
-`is_anycast` – `model.isAnycast()`: the address is an anycast address (`8.8.8.8` for example). Same present-only-when-true behaviour.
151
+
-`threat.blocklists[].first_seen` – `Blocklist.getFirstSeen()`: the first day the address was seen on that blocklist, as a `YYYY-MM-DD` (UTC) string, or `null` when the feed does not report it.
152
+
-`threat.blocklists[].last_seen` – `Blocklist.getLastSeen()`: the most recent such day, same format, or `null`.
153
+
-`threat.blocklists[].days_seen` – `Blocklist.getDaysSeen()`: the number of days the address was seen on that blocklist, as an `Integer`, or `null`.
154
+
147
155
#### Connection reuse and HTTP/2
148
156
An `IpdataService` keeps a persistent HTTPS connection pool for as long as it lives. Create one service per process (or one per API key or endpoint), keep it, and reuse it for every lookup: each new service pays a fresh TLS handshake. Requests to api.ipdata.co are multiplexed over HTTP/2 when the platform negotiates it, and fall back to HTTP/1.1 keep-alive otherwise.
149
157
@@ -177,6 +185,8 @@ exposes a method on each available field:
0 commit comments