Copyright | (c) IP2Location 2021 |
---|---|
License | MIT |
Maintainer | sales@ip2location.com |
Stability | experimental |
Safe Haskell | None |
Language | Haskell2010 |
This Haskell package provides a fast lookup of country, region, city, latitude, longitude, ZIP code, time zone, ISP, domain name, connection type, IDD code, area code, weather station code, weather station name, mcc, mnc, mobile brand, elevation, usage type, address type and IAB category from IP address by using IP2Location database. This package uses a file based database available at IP2Location.com. This database simply contains IP blocks as keys, and other information such as country, region, city, latitude, longitude, ZIP code, time zone, ISP, domain name, connection type, IDD code, area code, weather station code, weather station name, mcc, mnc, mobile brand, elevation, usage type, address type and IAB category as values. It supports both IP addresses in IPv4 and IPv6.
IP2Location LITE BIN databases are available for free at http://lite.ip2location.com/
Synopsis
- data Meta
- data IP2LocationRecord = IP2LocationRecord {
- country_short :: String
- country_long :: String
- region :: String
- city :: String
- isp :: String
- latitude :: Float
- longitude :: Float
- domain :: String
- zipcode :: String
- timezone :: String
- netspeed :: String
- iddcode :: String
- areacode :: String
- weatherstationcode :: String
- weatherstationname :: String
- mcc :: String
- mnc :: String
- mobilebrand :: String
- elevation :: Float
- usagetype :: String
- addresstype :: String
- category :: String
- getAPIVersion :: String
- doInit :: String -> IO Meta
- doQuery :: String -> Meta -> String -> IO IP2LocationRecord
Documentation
Contains the BIN database file metadata.
data IP2LocationRecord Source #
Contains geolocation results.
IP2LocationRecord | |
|
Instances
Show IP2LocationRecord Source # | |
Defined in IP2Location showsPrec :: Int -> IP2LocationRecord -> ShowS # show :: IP2LocationRecord -> String # showList :: [IP2LocationRecord] -> ShowS # |
getAPIVersion :: String Source #
The getAPIVersion
function returns a string containing the API version.