-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/
-- | IP2Location Haskell package for IP geolocation.
--
-- 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, IAB category, district, autonomous system number
-- (ASN) and autonomous system (AS) as values. It supports both IP
-- addresses in IPv4 and IPv6.
@package ip2location
@version 8.5.1
-- | 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, IAB
-- category, district, autonomous system number (ASN) and autonomous
-- system (AS) 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, IAB category, district, autonomous system
-- number (ASN) and autonomous system (AS) as values. It supports both IP
-- addresses in IPv4 and IPv6.
--
-- IP2Location LITE BIN databases are available for free at
-- http://lite.ip2location.com/
module IP2Location
-- | Contains the BIN database file metadata.
data Meta
-- | Contains geolocation results.
data IP2LocationRecord
IP2LocationRecord :: String -> String -> String -> String -> String -> Float -> Float -> String -> String -> String -> String -> String -> String -> String -> String -> String -> String -> String -> Float -> String -> String -> String -> String -> String -> String -> IP2LocationRecord
-- | Country code
[country_short] :: IP2LocationRecord -> String
-- | Country name
[country_long] :: IP2LocationRecord -> String
-- | Region name
[region] :: IP2LocationRecord -> String
-- | City name
[city] :: IP2LocationRecord -> String
-- | ISP name
[isp] :: IP2LocationRecord -> String
-- | Latitude
[latitude] :: IP2LocationRecord -> Float
-- | Longitude
[longitude] :: IP2LocationRecord -> Float
-- | Domain name
[domain] :: IP2LocationRecord -> String
-- | ZIP/Postal code
[zipcode] :: IP2LocationRecord -> String
-- | Timezone
[timezone] :: IP2LocationRecord -> String
-- | Network speed
[netspeed] :: IP2LocationRecord -> String
-- | IDD code
[iddcode] :: IP2LocationRecord -> String
-- | Area code
[areacode] :: IP2LocationRecord -> String
-- | Weather station code
[weatherstationcode] :: IP2LocationRecord -> String
-- | Weather station name
[weatherstationname] :: IP2LocationRecord -> String
-- | Mobile country code
[mcc] :: IP2LocationRecord -> String
-- | Mobile network code
[mnc] :: IP2LocationRecord -> String
-- | Carrier brand
[mobilebrand] :: IP2LocationRecord -> String
-- | Elevation in meters
[elevation] :: IP2LocationRecord -> Float
-- | Usage type
[usagetype] :: IP2LocationRecord -> String
-- | Address type
[addresstype] :: IP2LocationRecord -> String
-- | Category
[category] :: IP2LocationRecord -> String
-- | District
[district] :: IP2LocationRecord -> String
-- | ASN
[asn] :: IP2LocationRecord -> String
-- | AS
[as] :: IP2LocationRecord -> String
-- | The getAPIVersion function returns a string containing the API
-- version.
getAPIVersion :: String
-- | The doInit function returns the Meta record containing metadata
-- from the BIN database file. It takes one argument, of type
-- String, which is the path to the BIN database file.
doInit :: String -> IO Meta
-- | The doQuery function returns an IP2LocationRecord containing
-- geolocation data for an IP address. It takes 3 arguments; the BIN
-- database file path (String), the metadata from doInit function
-- (Meta record) & either IPv4 or IPv6 address (String).
doQuery :: String -> Meta -> String -> IO IP2LocationRecord
instance GHC.Show.Show IP2Location.IP2LocationRecord
instance GHC.Show.Show IP2Location.Meta
-- | This Haskell package allows users to query an IP address to get
-- geolocation info.
--
-- IP2Location Web Service API subscription at
-- https://www.ip2location.com/web-service/ip2location
module IP2LocationWebService
-- | Contains the web service results.
data WSResult
WSResult :: String -> Maybe String -> Maybe String -> Maybe String -> Maybe String -> Maybe Float -> Maybe Float -> Maybe String -> Maybe String -> Maybe String -> Maybe String -> Maybe String -> Maybe String -> Maybe String -> Maybe String -> Maybe String -> Maybe String -> Maybe String -> Maybe String -> Maybe Float -> Maybe String -> Maybe String -> Maybe String -> Maybe String -> Maybe Float -> WSResult
-- | Response status or error
[response] :: WSResult -> String
-- | Country code
[country_code] :: WSResult -> Maybe String
-- | Country name
[country_name] :: WSResult -> Maybe String
-- | Region name
[region_name] :: WSResult -> Maybe String
-- | City name
[city_name] :: WSResult -> Maybe String
-- | Latitude
[latitude] :: WSResult -> Maybe Float
-- | Longitude
[longitude] :: WSResult -> Maybe Float
-- | ZIP code
[zip_code] :: WSResult -> Maybe String
-- | Time zone
[time_zone] :: WSResult -> Maybe String
-- | ISP name
[isp] :: WSResult -> Maybe String
-- | Domain
[domain] :: WSResult -> Maybe String
-- | Net speed
[net_speed] :: WSResult -> Maybe String
-- | IDD code
[idd_code] :: WSResult -> Maybe String
-- | Area code
[area_code] :: WSResult -> Maybe String
-- | Weather station code
[weather_station_code] :: WSResult -> Maybe String
-- | Weather station name
[weather_station_name] :: WSResult -> Maybe String
-- | MCC
[mcc] :: WSResult -> Maybe String
-- | MNC
[mnc] :: WSResult -> Maybe String
-- | Mobile brand
[mobile_brand] :: WSResult -> Maybe String
-- | Elevation
[elevation] :: WSResult -> Maybe Float
-- | Usage type
[usage_type] :: WSResult -> Maybe String
-- | Address type
[address_type] :: WSResult -> Maybe String
-- | IAB category code
[category] :: WSResult -> Maybe String
-- | IAB category name
[category_name] :: WSResult -> Maybe String
-- | Credits consumed
[credits_consumed] :: WSResult -> Maybe Float
-- | Contains the web service configuration.
data WSConfig
-- | The openWS function initializes the web service configuration.
-- It takes 3 arguments; the web service API key, the API package to call
-- & whether to use SSL.
openWS :: String -> String -> Bool -> IO WSConfig
-- | The lookUp function returns an WSResult containing geolocation
-- data for an IP address It takes 2 arguments; the web service
-- configuration from openWS function (WSConfig record), either
-- IPv4 or IPv6 address (String)
lookUp :: WSConfig -> String -> IO WSResult
-- | The getCredit function returns an IO String containing web
-- service credit balance for the API key. It takes 1 argument; the web
-- service configuration from openWS function (WSConfig record).
getCredit :: WSConfig -> IO String
instance Data.Aeson.Types.ToJSON.ToJSON IP2LocationWebService.WSResult
instance Data.Aeson.Types.FromJSON.FromJSON IP2LocationWebService.WSResult
instance GHC.Show.Show IP2LocationWebService.WSConfig
instance GHC.Classes.Eq IP2LocationWebService.WSResult
instance GHC.Show.Show IP2LocationWebService.WSResult