class

Ipapi::Client

Inherits Reference < Object

Constructors

new(api_key : String | Nil = nil)
Source

Instance methods

asn(ip_address : String | Nil = nil) : String

Retrive autonomous system number of a specific IP address. If ip_address is nil, use the client's IP.

Source
city(ip_address : String | Nil = nil) : String

Retrive city name of a specific IP address. If ip_address is nil, use the client's IP.

Source
continent_code(ip_address : String | Nil = nil) : String

Retrive country code (2 letter, ISO 3166-1 alpha-2) of a specific IP address. If ip_address is nil, use the client's IP.

Source
country(ip_address : String | Nil = nil) : String

Retrive country code (2 letter, ISO 3166-1 alpha-2) of a specific IP address. If ip_address is nil, use the client's IP.

Source
country_area(ip_address : String | Nil = nil) : String

Retrive area of the country (in sq km) of a specific IP address. If ip_address is nil, use the client's IP.

Source
country_calling_code(ip_address : String | Nil = nil) : String

Retrive country calling code (dial in code, comma separated) of a specific IP address. If ip_address is nil, use the client's IP.

Source
country_capital(ip_address : String | Nil = nil) : String

Retrive capital of the country of a specific IP address. If ip_address is nil, use the client's IP.

Source
country_code(ip_address : String | Nil = nil) : String

Retrive country code (2 letter, ISO 3166-1 alpha-2) of a specific IP address. If ip_address is nil, use the client's IP.

Source
country_code_iso3(ip_address : String | Nil = nil) : String

Retrive country code (3 letter, ISO 3166-1 alpha-3) of a specific IP address. If ip_address is nil, use the client's IP.

Source
country_name(ip_address : String | Nil = nil) : String

Retrive short country name of a specific IP address. If ip_address is nil, use the client's IP.

Source
country_population(ip_address : String | Nil = nil) : String

Retrive population of the country of a specific IP address. If ip_address is nil, use the client's IP.

Source
country_tld(ip_address : String | Nil = nil) : String

Retrive country specific TLD (top-level domain) of a specific IP address. If ip_address is nil, use the client's IP.

Source
currency(ip_address : String | Nil = nil) : String

Retrive currency code (ISO 4217) of a specific IP address. If ip_address is nil, use the client's IP.

Source
currency_name(ip_address : String | Nil = nil) : String

Retrive currency name of a specific IP address. If ip_address is nil, use the client's IP.

Source
in_eu(ip_address : String | Nil = nil) : String

Retrive whether IP address belongs to a country that is a member of the European Union (EU) of a specific IP address. If ip_address is nil, use the client's IP.

Source
ip(ip_address : String | Nil = nil) : String

Retrive public (external) IP address (same as URL ip) of a specific IP address. If ip_address is nil, use the client's IP.

Source
languages(ip_address : String | Nil = nil) : String

Retrive languages spoken (comma separated 2 or 3 letter ISO 639 code with optional hyphen separated country suffix) of a specific IP address. If ip_address is nil, use the client's IP.

Source
latitude(ip_address : String | Nil = nil) : String

Retrive latitude of a specific IP address. If ip_address is nil, use the client's IP.

Source
latlong(ip_address : String | Nil = nil) : String

Retrive comma separated latitude and longitude of a specific IP address. If ip_address is nil, use the client's IP.

Source
locate(ip_address : String | Nil = nil) : Location | Nil

Retrive the location of a specific IP address. If ip_address is nil, use the client's IP.

Source
longitude(ip_address : String | Nil = nil) : String

Retrive longitude of a specific IP address. If ip_address is nil, use the client's IP.

Source
org(ip_address : String | Nil = nil) : String

Retrive organization name of a specific IP address. If ip_address is nil, use the client's IP.

Source
postal(ip_address : String | Nil = nil) : String

Retrive postal code / zip code of a specific IP address. If ip_address is nil, use the client's IP.

Source
region(ip_address : String | Nil = nil) : String

Retrive region name (administrative division) of a specific IP address. If ip_address is nil, use the client's IP.

Source
region_code(ip_address : String | Nil = nil) : String

Retrive region code of a specific IP address. If ip_address is nil, use the client's IP.

Source
timezone(ip_address : String | Nil = nil) : String

Retrive timezone (IANA format i.e. “Area/Location”) of a specific IP address. If ip_address is nil, use the client's IP.

Source
utc_offset(ip_address : String | Nil = nil) : String

Retrive UTC offset (with daylight saving time) as +HHMM or -HHMM (HH is hours, MM is minutes) of a specific IP address. If ip_address is nil, use the client's IP.

Source