Skip to content

Commit b36f912

Browse files
committed
v3.0.1 release
1 parent 0c60f08 commit b36f912

File tree

5 files changed

+89
-112
lines changed

5 files changed

+89
-112
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
# 3.0.1
2+
3+
- `IPResponse`: reflect `anycast` response field being renamed to `is_anycast`
4+
- fix and improve tests
5+
16
# 3.0.0
27

38
- Removed loading of country/continent/currency/EU-related data via files. This

README.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44

55
This is the official Java client library for the [IPinfo.io](https://ipinfo.io) IP address API, allowing you to look up your own IP address, or get any of the following details for an IP:
66

7-
- [IP geolocation data](https://ipinfo.io/ip-geolocation-api) (city, region, country, postal code, latitude, and longitude)
8-
- [ASN information](https://ipinfo.io/asn-api) (ISP or network operator, associated domain name, and type, such as business, hosting, or company)
9-
- [Company data](https://ipinfo.io/ip-company-api) (the name and domain of the business that uses the IP address)
10-
- [Carrier details](https://ipinfo.io/ip-carrier-api) (the name of the mobile carrier and MNC and MCC for that carrier if the IP is used exclusively for mobile traffic)
7+
- [IP geolocation data](https://ipinfo.io/ip-geolocation-api) (city, region, country, postal code, latitude, and longitude)
8+
- [ASN information](https://ipinfo.io/asn-api) (ISP or network operator, associated domain name, and type, such as business, hosting, or company)
9+
- [Company data](https://ipinfo.io/ip-company-api) (the name and domain of the business that uses the IP address)
10+
- [Carrier details](https://ipinfo.io/ip-carrier-api) (the name of the mobile carrier and MNC and MCC for that carrier if the IP is used exclusively for mobile traffic)
1111

1212
Check all the data we have for your IP address [here](https://ipinfo.io/what-is-my-ip).
1313

@@ -32,7 +32,7 @@ Dependency:
3232
<dependency>
3333
<groupId>io.ipinfo</groupId>
3434
<artifactId>ipinfo-api</artifactId>
35-
<version>3.0.0</version>
35+
<version>3.0.1</version>
3636
<scope>compile</scope>
3737
</dependency>
3838
</dependencies>
@@ -42,7 +42,7 @@ Dependency:
4242

4343
##### IP Information
4444

45-
````java
45+
```java
4646
import io.ipinfo.api.IPinfo;
4747
import io.ipinfo.api.errors.RateLimitedException;
4848
import io.ipinfo.api.model.IPResponse;
@@ -63,11 +63,11 @@ public class Main {
6363
}
6464
}
6565
}
66-
````
66+
```
6767

6868
##### ASN Information
6969

70-
````java
70+
```java
7171
import io.ipinfo.api.IPinfo;
7272
import io.ipinfo.api.errors.RateLimitedException;
7373
import io.ipinfo.api.model.IPResponse;
@@ -88,7 +88,7 @@ public class Main {
8888
}
8989
}
9090
}
91-
````
91+
```
9292

9393
#### Errors
9494

@@ -168,7 +168,7 @@ public class Main {
168168

169169
#### EU Country Lookup
170170

171-
This library provides a system to lookup if a country is a member of the European Union (EU) through
171+
This library provides a system to lookup if a country is a member of the European Union (EU) through
172172
ISO2 country codes.
173173

174174
```java

pom.xml

Lines changed: 72 additions & 100 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,19 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3-
xmlns="http://maven.apache.org/POM/4.0.0"
4-
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
2+
<project
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xmlns="http://maven.apache.org/POM/4.0.0"
5+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
56
<modelVersion>4.0.0</modelVersion>
67

78
<groupId>io.ipinfo</groupId>
89
<artifactId>ipinfo-api</artifactId>
9-
<version>3.0.0</version>
10+
<version>3.0.1</version>
1011
<packaging>jar</packaging>
1112

13+
<organization>
14+
<name>IPinfo</name>
15+
</organization>
16+
1217
<properties>
1318
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
1419
</properties>
@@ -35,19 +40,8 @@
3540
<url>[email protected]:ipinfo/java.git</url>
3641
<connection>scm:git:[email protected]:ipinfo/java.git</connection>
3742
<developerConnection>scm:git:[email protected]:ipinfo/java.git</developerConnection>
38-
<tag>HEAD</tag>
39-
</scm>
40-
41-
<distributionManagement>
42-
<snapshotRepository>
43-
<id>ossrh</id>
44-
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
45-
</snapshotRepository>
46-
<repository>
47-
<id>ossrh</id>
48-
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
49-
</repository>
50-
</distributionManagement>
43+
<tag>HEAD</tag>
44+
</scm>
5145

5246
<developers>
5347
<developer>
@@ -56,12 +50,6 @@
5650
<email>[email protected]</email>
5751
<organization>IPinfo</organization>
5852
</developer>
59-
<developer>
60-
<id>aaomidi</id>
61-
<name>Amir Omidi</name>
62-
<email>[email protected]</email>
63-
<organization>IPinfo</organization>
64-
</developer>
6553
</developers>
6654

6755
<dependencies>
@@ -97,82 +85,66 @@
9785
</dependency>
9886
</dependencies>
9987

100-
<build>
101-
<defaultGoal>clean package</defaultGoal>
102-
<directory>target</directory>
103-
<outputDirectory>target/classes</outputDirectory>
88+
<profiles>
89+
<profile>
90+
<id>release</id>
91+
<build>
92+
<plugins>
93+
<plugin>
94+
<groupId>org.sonatype.central</groupId>
95+
<artifactId>central-publishing-maven-plugin</artifactId>
96+
<version>0.7.0</version>
97+
<extensions>true</extensions>
98+
<configuration>
99+
<publishingServerId>central</publishingServerId>
100+
<autoPublish>true</autoPublish>
101+
</configuration>
102+
</plugin>
103+
104+
<plugin>
105+
<groupId>org.apache.maven.plugins</groupId>
106+
<artifactId>maven-source-plugin</artifactId>
107+
<version>3.3.1</version>
108+
<executions>
109+
<execution>
110+
<id>attach-sources</id>
111+
<goals>
112+
<goal>jar-no-fork</goal>
113+
</goals>
114+
</execution>
115+
</executions>
116+
</plugin>
104117

105-
<finalName>${project.name}-${project.version}</finalName>
118+
<plugin>
119+
<groupId>org.apache.maven.plugins</groupId>
120+
<artifactId>maven-javadoc-plugin</artifactId>
121+
<version>3.11.2</version>
122+
<executions>
123+
<execution>
124+
<id>attach-javadocs</id>
125+
<goals>
126+
<goal>jar</goal>
127+
</goals>
128+
</execution>
129+
</executions>
130+
</plugin>
106131

107-
<plugins>
108-
<plugin>
109-
<groupId>org.sonatype.plugins</groupId>
110-
<artifactId>nexus-staging-maven-plugin</artifactId>
111-
<version>1.6.13</version>
112-
<extensions>true</extensions>
113-
<configuration>
114-
<serverId>ossrh</serverId>
115-
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
116-
<autoReleaseAfterClose>true</autoReleaseAfterClose>
117-
</configuration>
118-
</plugin>
119-
<plugin>
120-
<groupId>org.apache.maven.plugins</groupId>
121-
<artifactId>maven-compiler-plugin</artifactId>
122-
<version>3.11.0</version>
123-
<configuration>
124-
<release>17</release>
125-
</configuration>
126-
</plugin>
127-
<plugin>
128-
<groupId>org.apache.maven.plugins</groupId>
129-
<artifactId>maven-source-plugin</artifactId>
130-
<version>3.2.1</version>
131-
<executions>
132-
<execution>
133-
<id>attach-sources</id>
134-
<phase>verify</phase>
135-
<goals>
136-
<goal>jar-no-fork</goal>
137-
</goals>
138-
</execution>
139-
</executions>
140-
</plugin>
141-
<plugin>
142-
<groupId>org.apache.maven.plugins</groupId>
143-
<artifactId>maven-javadoc-plugin</artifactId>
144-
<version>3.5.0</version>
145-
<executions>
146-
<execution>
147-
<id>attach-javadocs</id>
148-
<goals>
149-
<goal>jar</goal>
150-
</goals>
151-
</execution>
152-
</executions>
153-
</plugin>
154-
<plugin>
155-
<groupId>org.apache.maven.plugins</groupId>
156-
<artifactId>maven-release-plugin</artifactId>
157-
<version>3.0.1</version>
158-
<configuration>
159-
<goals>deploy</goals>
160-
</configuration>
161-
</plugin>
162-
<plugin>
163-
<groupId>org.apache.maven.plugins</groupId>
164-
<artifactId>maven-gpg-plugin</artifactId>
165-
<version>3.1.0</version>
166-
<executions>
167-
<execution>
168-
<id>sign-artifacts</id>
169-
<phase>verify</phase>
170-
<goals>
171-
<goal>sign</goal>
172-
</goals>
173-
</execution>
174-
</executions>
175-
</plugin>
176-
</plugins>
177-
</build>
178-
</project>
132+
<plugin>
133+
<groupId>org.apache.maven.plugins</groupId>
134+
<artifactId>maven-gpg-plugin</artifactId>
135+
<version>3.2.7</version>
136+
<executions>
137+
<execution>
138+
<id>sign-artifacts</id>
139+
<phase>verify</phase>
140+
<goals>
141+
<goal>sign</goal>
142+
</goals>
143+
</execution>
144+
</executions>
145+
</plugin>
146+
</plugins>
147+
</build>
148+
</profile>
149+
</profiles>
150+
</project>

src/main/java/io/ipinfo/api/IPinfo.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ private ConcurrentHashMap<String, Object> getBatchGeneric(
249249
.url(postUrl)
250250
.addHeader("Content-Type", "application/json")
251251
.addHeader("Authorization", Credentials.basic(token, ""))
252-
.addHeader("User-Agent", "IPinfoClient/Java/3.0.0");
252+
.addHeader("User-Agent", "IPinfoClient/Java/3.0.1");
253253

254254
for (int i = 0; i < lookupUrls.size(); i += batchSize) {
255255
// create chunk.

src/main/java/io/ipinfo/api/request/BaseRequest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ protected BaseRequest(OkHttpClient client, String token) {
2323
public Response handleRequest(Request.Builder request) throws RateLimitedException {
2424
request
2525
.addHeader("Authorization", Credentials.basic(token, ""))
26-
.addHeader("user-agent", "IPinfoClient/Java/3.0.0")
26+
.addHeader("user-agent", "IPinfoClient/Java/3.0.1")
2727
.addHeader("Content-Type", "application/json");
2828

2929
Response response;

0 commit comments

Comments
 (0)