@@ -65,12 +65,71 @@ The client is fully compliant with the API. The data model of the api is availab
6565Interaction with the API is captured by the Service Interface `` io.ipdata.client.service.IpdataService `` :
6666
6767#### Basic Usage
68- To get all available information about a given IP address, you can use the `` get `` method of the service Interface:
68+ To get all available information about a given IP address, you can use the `` ipdata `` method of the service Interface:
6969``` java
7070IpdataModel model = ipdataService. ipdata(" 1.1.1.1" );
7171System . out. println(jsonSerialize(model));
7272```
7373
74+ Output:
75+ ``` json
76+ {
77+ "ip" : " 1.1.1.1" ,
78+ "is_eu" : false ,
79+ "city" : null ,
80+ "region" : null ,
81+ "region_code" : null ,
82+ "country_name" : " Australia" ,
83+ "country_code" : " AU" ,
84+ "continent_name" : " Oceania" ,
85+ "continent_code" : " OC" ,
86+ "latitude" : -33.494 ,
87+ "longitude" : 143.2104 ,
88+ "postal" : null ,
89+ "calling_code" : " 61" ,
90+ "flag" : " https://ipdata.co/flags/au.png" ,
91+ "emoji_flag" : " \ud83c\udde6\ud83c\uddfa " ,
92+ "emoji_unicode" : " U+1F1E6 U+1F1FA" ,
93+ "asn" : {
94+ "asn" : " AS13335" ,
95+ "name" : " Cloudflare, Inc." ,
96+ "domain" : " cloudflare.com" ,
97+ "route" : " 1.1.1.0/24" ,
98+ "type" : " hosting"
99+ },
100+ "languages" : [
101+ {
102+ "name" : " English" ,
103+ "native" : " English"
104+ }
105+ ],
106+ "currency" : {
107+ "name" : " Australian Dollar" ,
108+ "code" : " AUD" ,
109+ "symbol" : " AU$" ,
110+ "native" : " $" ,
111+ "plural" : " Australian dollars"
112+ },
113+ "time_zone" : {
114+ "name" : " Australia/Sydney" ,
115+ "abbr" : " AEDT" ,
116+ "offset" : " +1100" ,
117+ "is_dst" : true ,
118+ "current_time" : " 2020-01-29T20:22:52.283874+11:00"
119+ },
120+ "threat" : {
121+ "is_tor" : false ,
122+ "is_proxy" : false ,
123+ "is_anonymous" : false ,
124+ "is_known_attacker" : false ,
125+ "is_known_abuser" : false ,
126+ "is_threat" : false ,
127+ "is_bogon" : false
128+ },
129+ "count" : " 0"
130+ }
131+ ```
132+
74133#### Single Field Selection
75134If you're interested in only one field from the model capturing an IP address information, The service interface
76135exposes some a method on each available field:
0 commit comments