- IMPORTANT: Java 8 is now required. If you need Java 7 support, please continue using 2.12.0.
DatabaseReader
now provides the methods that return anOptional
rather than throwing an exception when the record is not found in the database. These methods are prefixed with "try". Closes #28. Pull request by Luke Butters. GitHub #147.getNetwork()
methods have been added to the various response models. These return acom.maxmind.db.Network
object representing the largest network where all the fields besides the IP address are the same.- Updated documentation of anonymizer methods
isAnonymousVpn()
andisHostingProvider()
to be more descriptive. - The
DatabaseReader
methodscity()
andcountry()
can now be called on the Enterprise database and thecountry()
method can be called on City databases. Request by Gergely Boromissza. GitHub #132. - New
getStaticIpScore()
andgetUserCount()
methods were added tocom.maxmind.geoip2.record.Traits
for use with GeoIP2 Precision Insights. They represent a measure of how static or dynamic an IP address is, and an estimate of the number of users sharing a given address or network, respectively.
- Rename
userId
toaccountId
in various places and support the future error codesACCOUNT_ID_REQUIRED
andACCOUNT_ID_UNKNOWN
.
- The web service client now correctly handles a proxy of
Proxy.NO_PROXY
. - The
isInEuropeanUnion()
method was added tocom.maxmind.geoip2.record.Country
. This returnstrue
if the country is a member state of the European Union.
- The following new anonymizer methods were added to
com.maxmind.geoip2.record.Traits
for use with GeoIP2 Precision Insights:isAnonymous()
,isAnonymousVpn()
,isHostingProvider()
,isPublicProxy()
, andisTorExitNode()
.
- Added support for GeoLite2 ASN database.
- Update
maxmind-db
dependency to fixjackson-databind
version range issue. Closes GitHub #77. - Update most other dependencies.
- All changes included in 2.8.0-rc1.
- Updated documentation to clarify what the accuracy radius refers to.
- IMPORTANT: Java 7 is now required. If you need Java 6 support, please continue using 2.7.0 or earlier.
- This library no longer uses Google HTTP Client. It now directly uses Apache HttpClient. Closes #40, #66.
WebServiceClient
now implementsCloseable
. A pool of connections will be kept alive to be used across requests. To ensure all connections are closed when the object goes out of scope, callclose()
or use the try-with-resource statement as appropriate.- Setting of a proxy for the
WebServiceClient
is now supported by theproxy(Proxy)
builder method. - Updated documentation to reflect that the accuracy radius is now included in City.
- Updated dependencies.
- Added support for the GeoIP2 Enterprise database.
- This release was updated to 1.2.0 of the MaxMind DB reader, which includes faster caching with fewer allocations.
- The IP addresses in the database models are now injected via Jackson rather
than being added to the
JsonNode
before deserialization. Pull requests by Viktor Szathmáry. GitHub #56.
- The database reader now supports pluggable caching of the decoded data. By
default, no caching is performed. Please see the
README.md
file or the API docs for information on how to enable caching. Pull requests by Viktor Szathmáry. GitHub #55.
- Jackson now uses the constructors on model classes when mapping JSON and database records to them rather than overriding the access modifiers on them. Pull request by Martijn van Groningen. GitHub #51 & #52.
- The format of the output of the
toString()
methods in the models has changed to better represent the values returned by the databases and web services.toString()
should be only used for debugging and diagnostics. Do not try to parse it. If you want the contents of the model as a machine- readable string, usetoJson()
. - This release depends on version 1.0.1 of the MaxMind DB reader, which includes several performance enhancements from by Viktor Szathmáry.
- No code changes in this release
- Fix for version number in pom.xml example in README.md
- Slight documentation improvement referring to MaxMind-DB-Reader-java
- Add support for the
average_income
andpopulation_density
fields. - The
isAnonymousProxy()
andisSatelliteProvider()
methods oncom.maxmind.geoip2.record.Traits
have been deprecated. Please use our [GeoIP2 Anonymous IP database](https://www.maxmind.com/en/geoip2-anonymous- ip-database) to determine whether an IP address is used by an anonymizing service.
- A
DatabaseProvider
interface has been added to facilitate mocking ofDatabaseReader
. Pull request by Yonatan Most. GitHub #34. - A
getLeastSpecificSubdivision()
method has been added to theCityResponse
andInsightsResponse
model classes. This returns the least specific subdivision for the location, e.g., England for Oxford, GB. Pull request by Daniel Kaneider. GitHub #35. - The
InsightsResponse
andLocation
classes are no longer declared final. AbstractResponse
is now declaredabstract
.
- Added support for the GeoIP2 Anonymous IP database. The
DatabaseReader
class now has ananonymousIp()
method which returns anAnonymousIpResponse
object.
- First production release.
- The deprecated
cityIspOrg()
andomni()
methods have been removed fromDatabaseReader
andWebServiceClient
. - The lookup methods on
DatabaseReader
now throw anUnsupportedOperationException
if the incorrect method is used for the database. DatabaseReader
now provides the metadata for the database through thegetDatabase()
method.- All of our dependencies were updated to the latest available version.
- The
timeout
setter onWebServiceClient.Builder
was renamed toconnectTimeout
and areadTimeout
setter was added. The former timeout sets the timeout to establish a connection and the latter sets the timeout for reading from an established connection.
- Updated to depend on the latest version of
com.maxmind.db
andcom.fasterxml.jackson.core
.
- The web service client API has been updated for the v2.1 release of the web
service. In particular, the
cityIspOrg
andomni
methods onWebServiceClient
have been deprecated. Thecity
method now provides all of the data formerly provided bycityIspOrg
, and theomni
method has been replaced by theinsights
method. - Support was added for the GeoIP2 Connection Type, Domain, and ISP databases.
- Updated to version 0.3.3 of
maxmind-db
, which fixes a potential resource leak when used with a thread pool. - Updated Google HTTP Client dependency.
- The Maven build was updated to include a zip file with all dependencies.
- Added
toJson
method to response objects. - Fixed a potential issue when using the
WebServiceClient
in multi-threaded applications. - Updated documentation.
- Renamed
getSubdivisionsList
togetSubdivisions
onAbstractNamedRecord
. - An
InputStream
constructor was added to theDatabaseReader.Builder
class. This reads the stream into memory as if it was using theFileMode.MEMORY
mode. Patch by Matthew Daniel. - The source code is now attached during packaging. Patch by Matthew Daniel.
- IMPORTANT API CHANGE: The
DatabaseReader
class now uses a builder to construct the object. The class constructor onDatabaseReader
is no longer public. - Renamed the
languages
method on theWebServiceClient.Builder
tolocales
.
- Reorganized the response and record classes. The response classes end
with
Response
. The record classes no longer end inRecord
.
- Set the user-agent header to include API information.
- Updated documentation.
- Removed unused dependency from Maven POM.
- Removed class hierarchy among web-service endpoint models.
- Refactored database-reader API to more closely match the web-service API. Created a Java interface for the two classes.
- Reorganized the classes.
Client
was renamedWebServiceClient
and moved tocom.maxmind.geoip2
. Record classes now have a suffix of "Record". The product classes (e.g., Omni) were renamed to their product name with no "Lookup" suffix. - Additional specific exceptions were added to replace the general
WebServiceException
. - A
DatabaseReader
class was added to the distribution. This reads GeoIP2 databases and returns similar product object toWebServiceClient
.
- Replaced the public constructor on
Client
with aBuilder
class.
- First official beta release.
- Documentation updates and corrections.
- Changed license to Apache License, Version 2.0.
- Initial release