Skip to content

Commit 7afdbb9

Browse files
committed
Updated read me, change log, and pom to reflect changes to the project.
1 parent 67d9c87 commit 7afdbb9

File tree

2 files changed

+21
-20
lines changed

2 files changed

+21
-20
lines changed

README.md

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,14 @@ To do this, add the dependency to your pom.xml:
3333
<dependency>
3434
<groupId>com.maxmind.geoip2</groupId>
3535
<artifactId>geoip2</artifactId>
36-
<version>0.2.0</version>
36+
<version>0.3.0</version>
3737
</dependency>
3838
```
3939

4040
## Usage ##
4141

42-
To use this API, you must create a new ``com.maxmind.geoip2.webservice.Client``
43-
object with your ``userId`` and ``licenseKey``, then you call the method
42+
To use this API, you must create a new `com.maxmind.geoip2.WebServiceClient`
43+
object with your `userId` and `licenseKey`, then you call the method
4444
corresponding to a specific end point, passing it the IP address you want to
4545
look up.
4646

@@ -54,14 +54,14 @@ See the API documentation for more details.
5454

5555
```java
5656

57-
Client client = new Client.Builder(42, "abcfe12345").build();
57+
WebServiceClient client = new WebServiceClient.Builder(42, "abcfe12345").build();
5858

59-
OmniLookup omni = client.omni(InetAddress.getByName("24.24.24.24"));
59+
Omni omni = client.omni(InetAddress.getByName("24.24.24.24"));
6060

61-
City city = omni.getCity();
61+
CityRecord city = omni.getCity();
6262
System.out.println(city.getName());
6363

64-
Postal postal = omni.getPostal();
64+
PostalRecord postal = omni.getPostal();
6565
System.out.println(postal.getCode());
6666

6767
```
@@ -71,18 +71,19 @@ System.out.println(postal.getCode());
7171
For details on the possible errors returned by the web service itself, [see
7272
the GeoIP2 web service documentation](http://dev.maxmind.com/geoip2/geoip/web-services).
7373

74-
If the web service returns an explicit error document, this is thrown as a
75-
```WebServiceException```. If some other sort of transport error occurs,
76-
this is thrown as a ```HttpException```. The difference is that the web
77-
service error includes an error message and error code delivered by the
78-
web service. The latter is thrown when some sort of unanticipated error
79-
occurs, such as the web service returning a 500 or an invalid error document.
74+
If the web service returns an explicit error document, this is thrown as an
75+
`AddressNotFoundException`, an `AuthenticationException`, an
76+
`InvalidRequestException`, or an `OutOfQueriesException.
8077

81-
If the web service returns any status code besides 200, 4xx, or 5xx, this also
82-
becomes a ```HttpException```.
78+
If some sort of transport error occurs, an `HttpException` is thrown. This
79+
is thrown when some sort of unanticipated error occurs, such as the web
80+
service returning a 500 or an invalid error document. If the web service
81+
request returns any status code besides 200, 4xx, or 5xx, this also becomes
82+
an `HttpException`.
8383

8484
Finally, if the web service returns a 200 but the body is invalid, the client
85-
throws a ```GeoIP2Exception```.
85+
throws a `GeoIp2Exception`. This exception also is the parent exception to
86+
the above exceptions.
8687

8788
## What data is returned? ##
8889

@@ -109,10 +110,10 @@ check to see if the attribute is set.
109110
[GeoNames](http://www.geonames.org/) offers web services and downloadable
110111
databases with data on geographical features around the world, including
111112
populated places. They offer both free and paid premium data. Each
112-
feature is uniquely identified by a ```geonameId```, which is an integer.
113+
feature is uniquely identified by a `geonameId`, which is an integer.
113114

114115
Many of the records returned by the GeoIP2 web services and databases
115-
include a ```getGeonameId()``` method. This is the ID of a geographical
116+
include a `getGeonameId()` method. This is the ID of a geographical
116117
feature (city, region, country, etc.) in the GeoNames database.
117118

118119
Some of the data that MaxMind provides is also sourced from GeoNames. We

pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<modelVersion>4.0.0</modelVersion>
44
<groupId>com.maxmind.geoip2</groupId>
55
<artifactId>geoip2</artifactId>
6-
<version>0.2.1-SNAPSHOT</version>
6+
<version>0.3.0-SNAPSHOT</version>
77
<packaging>jar</packaging>
88
<name>MaxMind GeoIP2 API</name>
99
<description>API for accessing MaxMind's GeoIP2 web service</description>
@@ -39,7 +39,7 @@
3939
<dependency>
4040
<groupId>com.maxmind.maxminddb</groupId>
4141
<artifactId>maxminddb</artifactId>
42-
<version>0.1.0-SNAPSHOT</version>
42+
<version>0.1.0</version>
4343
</dependency>
4444
<dependency>
4545
<groupId>junit</groupId>

0 commit comments

Comments
 (0)