class GeoIP2::Database

Defined in:

geoip2/database.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(db : String | Bytes | IO::Memory, locales : Array(String)) #

[View source]

Instance Method Detail

def anonymous_ip(ip_address : String) : Model::AnonymousIp #

Returns Model::AnonymousIp or raises AddressNotFoundError if ip_address is not in the database


[View source]
def anonymous_ip?(ip_address : String) : Model::AnonymousIp | Nil #

Returns Model::AnonymousIp or nil if ip_address is not in the database


[View source]
def asn(ip_address : String) : Model::Asn #

Returns Model::Asn or raises AddressNotFoundError if ip_address is not in the database


[View source]
def asn?(ip_address : String) : Model::Asn | Nil #

Returns Model::Asn or nil if ip_address is not in the database


[View source]
def city(ip_address : String) : Model::City #

Returns Model::City or raises AddressNotFoundError if ip_address is not in the database


[View source]
def city?(ip_address : String) : Model::City | Nil #

Returns Model::City or nil if ip_address is not in the database


[View source]
def connection_type(ip_address : String) : Model::ConnectionType #

Returns Model::ConnectionType or raises AddressNotFoundError if ip_address is not in the database


[View source]
def connection_type?(ip_address : String) : Model::ConnectionType | Nil #

Returns Model::ConnectionType or nil if ip_address is not in the database


[View source]
def country(ip_address : String) : Model::Country #

Returns Model::Country or raises AddressNotFoundError if ip_address is not in the database


[View source]
def country?(ip_address : String) : Model::Country | Nil #

Returns Model::Country or nil if ip_address is not in the database


[View source]
def density_income(ip_address : String) : Model::DensityIncome #

Returns Model::DensityIncome or raises AddressNotFoundError if ip_address is not in the database


[View source]
def density_income?(ip_address : String) : Model::DensityIncome | Nil #

Returns Model::DensityIncome or nil if ip_address is not in the database


[View source]
def domain(ip_address : String) : Model::Domain #

Returns Model::Domain or raises AddressNotFoundError if ip_address is not in the database


[View source]
def domain?(ip_address : String) : Model::Domain | Nil #

Returns Model::Domain or nil if ip_address is not in the database


[View source]
def enterprise(ip_address : String) : Model::Enterprise #

Returns Model::Enterprise or raises AddressNotFoundError if ip_address is not in the database


[View source]
def enterprise?(ip_address : String) : Model::Enterprise | Nil #

Returns Model::Enterprise or nil if ip_address is not in the database


[View source]
def isp(ip_address : String) : Model::Isp #

Returns Model::Isp or raises AddressNotFoundError if ip_address is not in the database


[View source]
def isp?(ip_address : String) : Model::Isp | Nil #

Returns Model::Isp or nil if ip_address is not in the database


[View source]
def metadata #

[View source]
def user_count(ip_address : String) : Model::UserCount #

Returns Model::UserCount or raises AddressNotFoundError if ip_address is not in the database


[View source]
def user_count?(ip_address : String) : Model::UserCount | Nil #

Returns Model::UserCount or nil if ip_address is not in the database


[View source]