@@ -30,6 +30,8 @@ public class Geolocation {
3030 private String isp ;
3131 private String connectionType ;
3232 private String organization ;
33+ private String asn ;
34+ private String route ;
3335 private String geonameID ;
3436 private GeolocationCurrency currency ;
3537 private GeolocationTimezone timezone ;
@@ -64,6 +66,8 @@ public class Geolocation {
6466 this .isp = (String ) json .get ("isp" );
6567 this .connectionType = (String ) json .get ("connection_type" );
6668 this .organization = (String ) json .get ("organization" );
69+ this .asn = (String ) json .get ("asn" );
70+ this .route = (String ) json .get ("route" );
6771 this .geonameID = (String ) json .get ("geoname_id" );
6872 if (json .get ("currency" ) instanceof LinkedTreeMap ) {
6973 Map currencyJson = (LinkedTreeMap ) json .get ("currency" );
@@ -177,6 +181,14 @@ public String getOrganization() {
177181 return organization ;
178182 }
179183
184+ public String getAsn () {
185+ return asn ;
186+ }
187+
188+ public String getRoute () {
189+ return route ;
190+ }
191+
180192 public String getGeonameID () {
181193 return geonameID ;
182194 }
@@ -202,6 +214,6 @@ public String toString() {
202214 timezoneString = timezone .toString ();
203215 }
204216
205- return String .format ("domain: '%s' \n ip: '%s' \n hostname: '%s' \n continent_code: '%s' \n continent_name: '%s' \n country_code2: '%s' \n country_code3: '%s' \n country_name: '%s' \n country_capital: '%s \n state_prov: '%s' \n district: '%s' \n city: '%s' \n zipcode: '%s' \n latitude: '%s' \n longitude: '%s' \n is_eu: '%s' \n calling_code: '%s' \n country_tld: '%s' \n languages: '%s' \n country_flag: '%s' \n isp: '%s' \n connection_type: '%s' \n organization: '%s' \n geoname_id: '%s' \ n currency: {\n %s\n } \n time_zone: {\n %s\n }\n " , domain , ip , hostname , continentCode , continentName , countryCode2 , countryCode3 , countryName , countryCapital , stateProvince , district , city , zipCode , latitude , longitude , isEU , callingCode , countryTLD , languages , countryFlag , isp , connectionType , organization , geonameID , currencyString , timezoneString );
217+ return String .format ("domain: '%s' \n ip: '%s' \n hostname: '%s' \n continent_code: '%s' \n continent_name: '%s' \n country_code2: '%s' \n country_code3: '%s' \n country_name: '%s' \n country_capital: '%s \n state_prov: '%s' \n district: '%s' \n city: '%s' \n zipcode: '%s' \n latitude: '%s' \n longitude: '%s' \n is_eu: '%s' \n calling_code: '%s' \n country_tld: '%s' \n languages: '%s' \n country_flag: '%s' \n isp: '%s' \n connection_type: '%s' \n organization: '%s' \n geoname_id: '%s'\n asn: '%s' \n route: '%s' \ n currency: {\n %s\n } \n time_zone: {\n %s\n }\n " , domain , ip , hostname , continentCode , continentName , countryCode2 , countryCode3 , countryName , countryCapital , stateProvince , district , city , zipCode , latitude , longitude , isEU , callingCode , countryTLD , languages , countryFlag , isp , connectionType , organization , geonameID , asn , route , currencyString , timezoneString );
206218 }
207219}
0 commit comments