public class IP2LocationWebService extends Object
Example usage scenarios:
Copyright (c) 2002-2023 IP2Location.com
| Constructor and Description |
|---|
IP2LocationWebService() |
| Modifier and Type | Method and Description |
|---|---|
com.google.gson.JsonObject |
GetCredit()
This function to check web service credit balance.
|
com.google.gson.JsonObject |
IPQuery(String IPAddress)
This function to query IP2Location data.
|
com.google.gson.JsonObject |
IPQuery(String IPAddress,
String Language)
This function to query IP2Location data.
|
com.google.gson.JsonObject |
IPQuery(String IPAddress,
String[] AddOns,
String Language)
This function to query IP2Location data.
|
void |
Open(String APIKey,
String Package)
This function initializes the params for the web service.
|
void |
Open(String APIKey,
String Package,
boolean UseSSL)
This function initializes the params for the web service.
|
public void Open(String APIKey, String Package) throws IllegalArgumentException
APIKey - IP2Location Web Service API keyPackage - IP2Location Web Service package (WS1 to WS25)IllegalArgumentException - If an invalid parameter is specifiedpublic void Open(String APIKey, String Package, boolean UseSSL) throws IllegalArgumentException
APIKey - IP2Location Web Service API keyPackage - IP2Location Web Service package (WS1 to WS25)UseSSL - Set to true to call the web service using SSLIllegalArgumentException - If an invalid parameter is specifiedpublic com.google.gson.JsonObject IPQuery(String IPAddress) throws IllegalArgumentException, RuntimeException
IPAddress - IP Address you wish to queryIllegalArgumentException - If an invalid parameter is specifiedRuntimeException - If an exception occurred at runtimepublic com.google.gson.JsonObject IPQuery(String IPAddress, String Language) throws IllegalArgumentException, RuntimeException
IPAddress - IP Address you wish to queryLanguage - The translation languageIllegalArgumentException - If an invalid parameter is specifiedRuntimeException - If an exception occurred at runtimepublic com.google.gson.JsonObject IPQuery(String IPAddress, String[] AddOns, String Language) throws IllegalArgumentException, RuntimeException
IPAddress - IP Address you wish to queryAddOns - The list of AddOns results to returnLanguage - The translation languageIllegalArgumentException - If an invalid parameter is specifiedRuntimeException - If an exception occurred at runtimepublic com.google.gson.JsonObject GetCredit()
throws IllegalArgumentException,
RuntimeException
IllegalArgumentException - If an invalid parameter is specifiedRuntimeException - If an exception occurred at runtimeCopyright © 2017–2023. All rights reserved.