Class IPinfo
java.lang.Object
io.ipinfo.api.IPinfo
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic StringConverts a normal key into a versioned cache key.Get the result of a list of URLs in bulk.getBatch(List<String> urls, IPinfo.BatchReqOpts opts) Get the result of a list of URLs in bulk.getBatchAsns(List<String> asns) Get the result of a list of ASNs in bulk.getBatchAsns(List<String> asns, IPinfo.BatchReqOpts opts) Get the result of a list of ASNs in bulk.getBatchIps(List<String> ips) Get the result of a list of IPs in bulk.getBatchIps(List<String> ips, IPinfo.BatchReqOpts opts) Get the result of a list of IPs in bulk.Get a map of a list of IPs.Lookup ASN information using the AS number.Lookup IP information using the IP.lookupResproxy(String ip) Lookup residential proxy information using the IP.static void
-
Method Details
-
main
-
lookupIP
Lookup IP information using the IP.- Parameters:
ip- the ip string to lookup - accepts both ipv4 and ipv6.- Returns:
- IPResponse response from the api.
- Throws:
RateLimitedException- an exception when your api key has been rate limited.
-
lookupASN
Lookup ASN information using the AS number.- Parameters:
asn- the asn string to lookup.- Returns:
- ASNResponse response from the api.
- Throws:
RateLimitedException- an exception when your api key has been rate limited.
-
lookupResproxy
Lookup residential proxy information using the IP.- Parameters:
ip- the ip string to lookup - accepts both ipv4 and ipv6.- Returns:
- ResproxyResponse response from the api.
- Throws:
RateLimitedException- an exception when your api key has been rate limited.
-
getMap
Get a map of a list of IPs.- Parameters:
ips- the list of IPs to map.- Returns:
- String the URL to the map.
- Throws:
RateLimitedException- an exception when your API key has been rate limited.
-
getBatch
Get the result of a list of URLs in bulk.- Parameters:
urls- the list of URLs.- Returns:
- the result where each URL is the key and the value is the data for that URL.
- Throws:
RateLimitedException- an exception when your API key has been rate limited.
-
getBatch
public ConcurrentHashMap<String,Object> getBatch(List<String> urls, IPinfo.BatchReqOpts opts) throws RateLimitedException Get the result of a list of URLs in bulk.- Parameters:
urls- the list of URLs.opts- options to modify the behavior of the batch operation.- Returns:
- the result where each URL is the key and the value is the data for that URL.
- Throws:
RateLimitedException- an exception when your API key has been rate limited.
-
getBatchIps
public ConcurrentHashMap<String, IPResponse> getBatchIps(List<String> ips) throws RateLimitedException Get the result of a list of IPs in bulk.- Parameters:
ips- the list of IPs.- Returns:
- the result where each IP is the key and the value is the data for that IP.
- Throws:
RateLimitedException- an exception when your API key has been rate limited.
-
getBatchIps
public ConcurrentHashMap<String, IPResponse> getBatchIps(List<String> ips, IPinfo.BatchReqOpts opts) throws RateLimitedException Get the result of a list of IPs in bulk.- Parameters:
ips- the list of IPs.opts- options to modify the behavior of the batch operation.- Returns:
- the result where each IP is the key and the value is the data for that IP.
- Throws:
RateLimitedException- an exception when your API key has been rate limited.
-
getBatchAsns
public ConcurrentHashMap<String, ASNResponse> getBatchAsns(List<String> asns) throws RateLimitedException Get the result of a list of ASNs in bulk.- Parameters:
asns- the list of ASNs.- Returns:
- the result where each ASN is the key and the value is the data for that ASN.
- Throws:
RateLimitedException- an exception when your API key has been rate limited.
-
getBatchAsns
public ConcurrentHashMap<String, ASNResponse> getBatchAsns(List<String> asns, IPinfo.BatchReqOpts opts) throws RateLimitedException Get the result of a list of ASNs in bulk.- Parameters:
asns- the list of ASNs.opts- options to modify the behavior of the batch operation.- Returns:
- the result where each ASN is the key and the value is the data for that ASN.
- Throws:
RateLimitedException- an exception when your API key has been rate limited.
-
cacheKey
-