Skip to content

Commit 106398e

Browse files
authored
Merge pull request #713 from maxmind/greg/stf-555
Update Anonymizer javadoc to current Insights service name
2 parents 5553529 + 4eb0b41 commit 106398e

28 files changed

Lines changed: 108 additions & 108 deletions

CLAUDE.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
# CLAUDE.md - GeoIP2 Java API
1+
# CLAUDE.md - GeoIP Java API
22

33
This document contains guidance for Claude (and other AI assistants) when working with the GeoIP2-java codebase. It captures architectural patterns, conventions, and lessons learned to help maintain consistency and quality.
44

55
## Project Overview
66

77
**GeoIP2-java** is MaxMind's official Java client library for:
8-
- **GeoIP2/GeoLite2 Web Services**: Country, City, and Insights endpoints
9-
- **GeoIP2/GeoLite2 Databases**: Local MMDB file reading for various database types (City, Country, ASN, Anonymous IP, ISP, etc.)
8+
- **GeoIP/GeoLite Web Services**: Country, City Plus, and Insights endpoints
9+
- **GeoIP/GeoLite Databases**: Local MMDB file reading for various database types (City, Country, ASN, Anonymous IP, ISP, etc.)
1010

1111
The library provides both web service clients and database readers that return strongly-typed model objects containing geographic, ISP, anonymizer, and other IP-related data.
1212

@@ -397,7 +397,7 @@ public interface JsonSerializable {
397397
## Additional Resources
398398

399399
- [API Documentation](https://maxmind.github.io/GeoIP2-java/)
400-
- [GeoIP2 Web Services Docs](https://dev.maxmind.com/geoip/docs/web-services)
400+
- [GeoIP Web Services Docs](https://dev.maxmind.com/geoip/docs/web-services)
401401
- [MaxMind DB Format](https://maxmind.github.io/MaxMind-DB/)
402402
- GitHub Issues: https://github.com/maxmind/GeoIP2-java/issues
403403

README.md

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
# GeoIP2 Java API #
1+
# GeoIP Java API #
22

33
## Description ##
44

5-
This distribution provides an API for the GeoIP2 and GeoLite2 [web
5+
This distribution provides an API for the GeoIP and GeoLite [web
66
services](https://dev.maxmind.com/geoip/docs/web-services?lang=en) and
77
[databases](https://dev.maxmind.com/geoip/docs/databases?lang=en).
88

@@ -43,16 +43,16 @@ file and its dependencies in your classpath. Download the JAR files from the
4343
## IP Geolocation Usage ##
4444

4545
IP geolocation is inherently imprecise. Locations are often near the center of
46-
the population. Any location provided by a GeoIP2 database or web service
46+
the population. Any location provided by a GeoIP database or web service
4747
should not be used to identify a particular address or household.
4848

4949
## Web Service Usage ##
5050

5151
To use the web service API, you must create a new `WebServiceClient` using the
5252
`WebServiceClient.Builder`. You must provide the `Builder` constructor your
53-
MaxMind `accountId` and `licenseKey`. To use the GeoLite2 web services instead
54-
of GeoIP2, set the `host` method on the builder to `geolite.info`. To use
55-
the Sandbox GeoIP2 web services instead of the production GeoIP2 web
53+
MaxMind `accountId` and `licenseKey`. To use the GeoLite web services instead
54+
of GeoIP, set the `host` method on the builder to `geolite.info`. To use
55+
the Sandbox GeoIP web services instead of the production GeoIP web
5656
services, set the `host` method on the builder to `sandbox.maxmind.com`.
5757
You may also set a `timeout` or set the `locales` fallback order using the
5858
methods on the `Builder`. After you have created the `WebServiceClient`,
@@ -122,10 +122,10 @@ before any intermediary does so.
122122
// connections alive for future requests.
123123
//
124124
// Replace "42" with your account ID and "license_key" with your license key.
125-
// To use the GeoLite2 web service instead of the GeoIP2 web service, call the
125+
// To use the GeoLite web service instead of the GeoIP web service, call the
126126
// host method on the builder with "geolite.info", e.g.
127127
// new WebServiceClient.Builder(42, "license_key").host("geolite.info").build()
128-
// To use the Sandbox GeoIP2 web service instead of the production GeoIP2
128+
// To use the Sandbox GeoIP web service instead of the production GeoIP
129129
// web service, call the host method on the builder with
130130
// "sandbox.maxmind.com", e.g.
131131
// new WebServiceClient.Builder(42, "license_key").host("sandbox.maxmind.com").build()
@@ -151,10 +151,10 @@ System.out.println(country.names().get("zh-CN")); // '美国'
151151
// connections alive for future requests.
152152
//
153153
// Replace "42" with your account ID and "license_key" with your license key.
154-
// To use the GeoLite2 web service instead of the GeoIP2 web service, call the
154+
// To use the GeoLite web service instead of the GeoIP web service, call the
155155
// host method on the builder with "geolite.info", e.g.
156156
// new WebServiceClient.Builder(42, "license_key").host("geolite.info").build()
157-
// To use the Sandbox GeoIP2 web service instead of the production GeoIP2
157+
// To use the Sandbox GeoIP web service instead of the production GeoIP
158158
// web service, call the host method on the builder with
159159
// "sandbox.maxmind.com", e.g.
160160
// new WebServiceClient.Builder(42, "license_key").host("sandbox.maxmind.com").build()
@@ -194,8 +194,8 @@ System.out.println(location.longitude()); // -93.2323
194194
// connections alive for future requests.
195195
//
196196
// Replace "42" with your account ID and "license_key" with your license key.
197-
// Please note that the GeoLite2 web service does not support Insights.
198-
// To use the Sandbox GeoIP2 web service instead of the production GeoIP2
197+
// Please note that the GeoLite web service does not support Insights.
198+
// To use the Sandbox GeoIP web service instead of the production GeoIP
199199
// web service, call the host method on the builder with
200200
// "sandbox.maxmind.com", e.g.
201201
// new WebServiceClient.Builder(42, "license_key").host("sandbox.maxmind.com").build()
@@ -239,7 +239,7 @@ System.out.println(response.traits().userType()); // 'college'
239239

240240
To use the database API, you must create a new `DatabaseReader` using the
241241
`DatabaseReader.Builder`. You must provide the `Builder` constructor either an
242-
`InputStream` or `File` for your GeoIP2 database. You may also specify the
242+
`InputStream` or `File` for your GeoIP database. You may also specify the
243243
`fileMode` and the `locales` fallback order using the methods on the `Builder`
244244
object.
245245

@@ -254,7 +254,7 @@ method will be slightly faster as they do not need to construct and throw
254254
an exception. These methods otherwise behave the same.
255255

256256
If the lookup succeeds, the method call will return a response class for the
257-
GeoIP2 lookup. The class in turn contains multiple record classes, each of
257+
GeoIP lookup. The class in turn contains multiple record classes, each of
258258
which represents part of the data returned by the database.
259259

260260
We recommend reusing the `DatabaseReader` object rather than creating a new
@@ -291,7 +291,7 @@ thrown when querying the database.
291291
### City ###
292292

293293
```java
294-
// A File object pointing to your GeoIP2 or GeoLite2 database
294+
// A File object pointing to your GeoIP or GeoLite database
295295
File database = new File("/path/to/GeoIP2-City.mmdb");
296296

297297
// This creates the DatabaseReader object. To improve performance, reuse
@@ -327,7 +327,7 @@ try (DatabaseReader reader = new DatabaseReader.Builder(database).build()) {
327327
### Anonymous IP ###
328328

329329
```java
330-
// A File object pointing to your GeoIP2 Anonymous IP database
330+
// A File object pointing to your GeoIP Anonymous IP database
331331
File database = new File("/path/to/GeoIP2-Anonymous-IP.mmdb");
332332

333333
// This creates the DatabaseReader object. To improve performance, reuse
@@ -349,7 +349,7 @@ try (DatabaseReader reader = new DatabaseReader.Builder(database).build()) {
349349
### Anonymous Plus ###
350350

351351
```java
352-
// A File object pointing to your GeoIP2 Anonymous Plus database
352+
// A File object pointing to your GeoIP Anonymous Plus database
353353
File database = new File("/path/to/GeoIP-Anonymous-Plus.mmdb");
354354

355355
// This creates the DatabaseReader object. To improve performance, reuse
@@ -374,7 +374,7 @@ try (DatabaseReader reader = new DatabaseReader.Builder(database).build()) {
374374
### ASN ###
375375

376376
```java
377-
// A File object pointing to your GeoLite2 ASN database
377+
// A File object pointing to your GeoLite ASN database
378378
File database = new File("/path/to/GeoLite2-ASN.mmdb");
379379

380380
// This creates the DatabaseReader object. To improve performance, reuse
@@ -393,7 +393,7 @@ try (DatabaseReader reader = new DatabaseReader.Builder(database).build()) {
393393
### Connection-Type ###
394394

395395
```java
396-
// A File object pointing to your GeoIP2 Connection-Type database
396+
// A File object pointing to your GeoIP Connection-Type database
397397
File database = new File("/path/to/GeoIP2-Connection-Type.mmdb");
398398

399399
// This creates the DatabaseReader object. To improve performance, reuse
@@ -413,7 +413,7 @@ try (DatabaseReader reader = new DatabaseReader.Builder(database).build()) {
413413
### Domain ###
414414

415415
```java
416-
// A File object pointing to your GeoIP2 Domain database
416+
// A File object pointing to your GeoIP Domain database
417417
File database = new File("/path/to/GeoIP2-Domain.mmdb");
418418

419419
// This creates the DatabaseReader object. To improve performance, reuse
@@ -430,7 +430,7 @@ try (DatabaseReader reader = new DatabaseReader.Builder(database).build()) {
430430
### Enterprise ###
431431

432432
```java
433-
// A File object pointing to your GeoIP2 Enterprise database
433+
// A File object pointing to your GeoIP Enterprise database
434434
File database = new File("/path/to/GeoIP2-Enterprise.mmdb");
435435

436436
// This creates the DatabaseReader object. To improve performance, reuse
@@ -470,7 +470,7 @@ try (DatabaseReader reader = new DatabaseReader.Builder(database).build()) {
470470
### ISP ###
471471

472472
```java
473-
// A File object pointing to your GeoIP2 ISP database
473+
// A File object pointing to your GeoIP ISP database
474474
File database = new File("/path/to/GeoIP2-ISP.mmdb");
475475

476476
// This creates the DatabaseReader object. To improve performance, reuse
@@ -490,7 +490,7 @@ try (DatabaseReader reader = new DatabaseReader.Builder(database).build()) {
490490
## Exceptions ##
491491

492492
For details on the possible errors returned by the web service itself, [see
493-
the GeoIP2 web service
493+
the GeoIP web service
494494
documentation](https://dev.maxmind.com/geoip/docs/web-services?lang=en).
495495

496496
If the web service returns an explicit error document, this is thrown as an
@@ -550,7 +550,7 @@ databases with data on geographical features around the world, including
550550
populated places. They offer both free and paid premium data. Each
551551
feature is uniquely identified by a `geonameId`, which is an integer.
552552

553-
Many of the records returned by the GeoIP2 web services and databases
553+
Many of the records returned by the GeoIP web services and databases
554554
include a `geonameId()` method. This is the ID of a geographical
555555
feature (city, region, country, etc.) in the GeoNames database.
556556

@@ -596,7 +596,7 @@ whenever possible.
596596

597597
## Versioning ##
598598

599-
The GeoIP2 Java API uses [Semantic Versioning](https://semver.org/).
599+
The GeoIP Java API uses [Semantic Versioning](https://semver.org/).
600600

601601
## Copyright and License ##
602602

docs/hugo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
title = "GeoIP2 Java API"
1+
title = "GeoIP Java API"
22
disableKinds = ["taxonomy", "term", "RSS"]
33

44
[[cascade]]

pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
<artifactId>geoip2</artifactId>
66
<version>5.1.0</version>
77
<packaging>jar</packaging>
8-
<name>MaxMind GeoIP2 API</name>
9-
<description>GeoIP2 webservice client and database reader</description>
8+
<name>MaxMind GeoIP API</name>
9+
<description>GeoIP webservice client and database reader</description>
1010
<url>https://dev.maxmind.com/geoip?lang=en</url>
1111
<licenses>
1212
<license>

src/main/java/com/maxmind/geoip2/DatabaseProvider.java

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
import java.util.Optional;
1717

1818
/**
19-
* Interface for GeoIP2 database providers.
19+
* Interface for GeoIP database providers.
2020
*/
2121
public interface DatabaseProvider extends GeoIp2Provider {
2222

@@ -39,7 +39,7 @@ Optional<CityResponse> tryCity(InetAddress ipAddress) throws IOException,
3939
GeoIp2Exception;
4040

4141
/**
42-
* Look up an IP address in a GeoIP2 Anonymous IP.
42+
* Look up an IP address in a GeoIP Anonymous IP.
4343
*
4444
* @param ipAddress IPv4 or IPv6 address to lookup.
4545
* @return a AnonymousIpResponse for the requested IP address.
@@ -50,7 +50,7 @@ AnonymousIpResponse anonymousIp(InetAddress ipAddress) throws IOException,
5050
GeoIp2Exception;
5151

5252
/**
53-
* Look up an IP address in a GeoIP2 Anonymous IP.
53+
* Look up an IP address in a GeoIP Anonymous IP.
5454
*
5555
* @param ipAddress IPv4 or IPv6 address to lookup.
5656
* @return a AnonymousIpResponse for the requested IP address or empty if it is not in the DB.
@@ -61,7 +61,7 @@ Optional<AnonymousIpResponse> tryAnonymousIp(InetAddress ipAddress) throws IOExc
6161
GeoIp2Exception;
6262

6363
/**
64-
* Look up an IP address in a GeoIP2 Anonymous Plus.
64+
* Look up an IP address in a GeoIP Anonymous Plus.
6565
*
6666
* @param ipAddress IPv4 or IPv6 address to lookup.
6767
* @return a AnonymousPlusResponse for the requested IP address.
@@ -72,7 +72,7 @@ AnonymousPlusResponse anonymousPlus(InetAddress ipAddress) throws IOException,
7272
GeoIp2Exception;
7373

7474
/**
75-
* Look up an IP address in a GeoIP2 Anonymous Plus.
75+
* Look up an IP address in a GeoIP Anonymous Plus.
7676
*
7777
* @param ipAddress IPv4 or IPv6 address to lookup.
7878
* @return a AnonymousPlusResponse for the requested IP address or empty if it is not in the DB.
@@ -83,7 +83,7 @@ Optional<AnonymousPlusResponse> tryAnonymousPlus(InetAddress ipAddress) throws I
8383
GeoIp2Exception;
8484

8585
/**
86-
* Look up an IP address in a GeoIP2 IP Risk database.
86+
* Look up an IP address in a GeoIP IP Risk database.
8787
*
8888
* @param ipAddress IPv4 or IPv6 address to lookup.
8989
* @return an IpRiskResponse for the requested IP address.
@@ -94,7 +94,7 @@ IpRiskResponse ipRisk(InetAddress ipAddress) throws IOException,
9494
GeoIp2Exception;
9595

9696
/**
97-
* Look up an IP address in a GeoIP2 IP Risk database.
97+
* Look up an IP address in a GeoIP IP Risk database.
9898
*
9999
* @param ipAddress IPv4 or IPv6 address to lookup.
100100
* @return an IPRiskResponse for the requested IP address or empty if it is not in the DB.
@@ -105,7 +105,7 @@ Optional<IpRiskResponse> tryIpRisk(InetAddress ipAddress) throws IOException,
105105
GeoIp2Exception;
106106

107107
/**
108-
* Look up an IP address in a GeoLite2 ASN database.
108+
* Look up an IP address in a GeoLite ASN database.
109109
*
110110
* @param ipAddress IPv4 or IPv6 address to lookup.
111111
* @return an IspResponse for the requested IP address.
@@ -116,7 +116,7 @@ AsnResponse asn(InetAddress ipAddress) throws IOException,
116116
GeoIp2Exception;
117117

118118
/**
119-
* Look up an IP address in a GeoLite2 ASN database.
119+
* Look up an IP address in a GeoLite ASN database.
120120
*
121121
* @param ipAddress IPv4 or IPv6 address to lookup.
122122
* @return an IspResponse for the requested IP address or empty if it is not in the DB.
@@ -127,7 +127,7 @@ Optional<AsnResponse> tryAsn(InetAddress ipAddress) throws IOException,
127127
GeoIp2Exception;
128128

129129
/**
130-
* Look up an IP address in a GeoIP2 Connection Type database.
130+
* Look up an IP address in a GeoIP Connection Type database.
131131
*
132132
* @param ipAddress IPv4 or IPv6 address to lookup.
133133
* @return a ConnectTypeResponse for the requested IP address.
@@ -138,7 +138,7 @@ ConnectionTypeResponse connectionType(InetAddress ipAddress)
138138
throws IOException, GeoIp2Exception;
139139

140140
/**
141-
* Look up an IP address in a GeoIP2 Connection Type database.
141+
* Look up an IP address in a GeoIP Connection Type database.
142142
*
143143
* @param ipAddress IPv4 or IPv6 address to lookup.
144144
* @return a ConnectTypeResponse for the requested IP address or empty if it is not in the DB.
@@ -149,7 +149,7 @@ Optional<ConnectionTypeResponse> tryConnectionType(InetAddress ipAddress)
149149
throws IOException, GeoIp2Exception;
150150

151151
/**
152-
* Look up an IP address in a GeoIP2 Domain database.
152+
* Look up an IP address in a GeoIP Domain database.
153153
*
154154
* @param ipAddress IPv4 or IPv6 address to lookup.
155155
* @return a DomainResponse for the requested IP address.
@@ -160,7 +160,7 @@ DomainResponse domain(InetAddress ipAddress) throws IOException,
160160
GeoIp2Exception;
161161

162162
/**
163-
* Look up an IP address in a GeoIP2 Domain database.
163+
* Look up an IP address in a GeoIP Domain database.
164164
*
165165
* @param ipAddress IPv4 or IPv6 address to lookup.
166166
* @return a DomainResponse for the requested IP address or empty if it is not in the DB.
@@ -171,7 +171,7 @@ Optional<DomainResponse> tryDomain(InetAddress ipAddress) throws IOException,
171171
GeoIp2Exception;
172172

173173
/**
174-
* Look up an IP address in a GeoIP2 Enterprise database.
174+
* Look up an IP address in a GeoIP Enterprise database.
175175
*
176176
* @param ipAddress IPv4 or IPv6 address to lookup.
177177
* @return an EnterpriseResponse for the requested IP address.
@@ -182,7 +182,7 @@ EnterpriseResponse enterprise(InetAddress ipAddress) throws IOException,
182182
GeoIp2Exception;
183183

184184
/**
185-
* Look up an IP address in a GeoIP2 Enterprise database.
185+
* Look up an IP address in a GeoIP Enterprise database.
186186
*
187187
* @param ipAddress IPv4 or IPv6 address to lookup.
188188
* @return an EnterpriseResponse for the requested IP address or empty if it is not in the DB.
@@ -193,7 +193,7 @@ Optional<EnterpriseResponse> tryEnterprise(InetAddress ipAddress) throws IOExcep
193193
GeoIp2Exception;
194194

195195
/**
196-
* Look up an IP address in a GeoIP2 ISP database.
196+
* Look up an IP address in a GeoIP ISP database.
197197
*
198198
* @param ipAddress IPv4 or IPv6 address to lookup.
199199
* @return an IspResponse for the requested IP address.
@@ -204,7 +204,7 @@ IspResponse isp(InetAddress ipAddress) throws IOException,
204204
GeoIp2Exception;
205205

206206
/**
207-
* Look up an IP address in a GeoIP2 ISP database.
207+
* Look up an IP address in a GeoIP ISP database.
208208
*
209209
* @param ipAddress IPv4 or IPv6 address to look up or empty if it is not in the DB.
210210
* @return an IspResponse for the requested IP address.

0 commit comments

Comments
 (0)