class IP2Country
- IP2Country
- Reference
- Object
Defined in:
ip2country.crConstant Summary
-
CACHE_DIR =
(File.expand_path(File.dirname(File.dirname("/srv/crystaldoc.info/github-arcage-ip2country-v0.1.4/src/ip2country.cr")))) + "/cache"
-
LANGS =
Set.new(["en", "fr", "de", "es", "pt", "ja", "ko", "zh"])
-
REGISTRARS =
{"ARIN" => "http://ftp.arin.net/pub/stats/arin/delegated-arin-extended-latest", "RIPE" => "https://ftp.ripe.net/pub/stats/ripencc/delegated-ripencc-extended-latest", "APNIC" => "https://ftp.apnic.net/stats/apnic/delegated-apnic-extended-latest", "LACNIC" => "http://ftp.lacnic.net/pub/stats/lacnic/delegated-lacnic-extended-latest", "AFRINIC" => "http://ftp.afrinic.net/pub/stats/afrinic/delegated-afrinic-extended-latest"}
-
VERSION =
"0.1.4"
Constructors
Class Method Summary
Instance Method Summary
- #lookup(addr : String, lang : String = @default_lang) : String
- #lookup(addr : IPAddr, lang : String = @default_lang) : String
- #lookup_all(addr : String) : Hash(String, String)
- #lookup_all(addr : IPAddr) : Hash(String, String)