Copyright | (c) IP2Location 2021 |
---|---|
License | MIT |
Maintainer | sales@ip2location.com |
Stability | experimental |
Safe Haskell | None |
Language | Haskell2010 |
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
Synopsis
- data WSResult = WSResult {
- response :: String
- country_code :: Maybe String
- country_name :: Maybe String
- region_name :: Maybe String
- city_name :: Maybe String
- latitude :: Maybe Float
- longitude :: Maybe Float
- zip_code :: Maybe String
- time_zone :: Maybe String
- isp :: Maybe String
- domain :: Maybe String
- net_speed :: Maybe String
- idd_code :: Maybe String
- area_code :: Maybe String
- weather_station_code :: Maybe String
- weather_station_name :: Maybe String
- mcc :: Maybe String
- mnc :: Maybe String
- mobile_brand :: Maybe String
- elevation :: Maybe Float
- usage_type :: Maybe String
- address_type :: Maybe String
- category :: Maybe String
- category_name :: Maybe String
- credits_consumed :: Maybe Float
- data WSConfig
- openWS :: String -> String -> Bool -> IO WSConfig
- lookUp :: WSConfig -> String -> IO WSResult
- getCredit :: WSConfig -> IO String
Documentation
Contains the web service results.
WSResult | |
|
Contains the web service configuration.
openWS :: String -> String -> Bool -> IO WSConfig Source #
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.