-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Bindings to the MapQuest API -- -- This library provides a high-level interface to the MapQuest API. -- Currently only the "geocoding" API (street address to coordinates) is -- provided, but the functionality is straightforward to extend. @package mapquest-api @version 0.2.0.0 module Web.API.MapQuest -- | Call the MapQuest Geocoding API with a given address and extract the -- coordinates from the parsed result. -- -- Example usage : assuming the user has bound key to hold the API -- key string, the following can be run in a GHCi shell : -- --
--   >>> request key (GQ "Via Irnerio" "Bologna" "Italy")
--   Just (Coords {lat = 44.49897, long = 11.34503})
--   
-- --
--   >>> request key (GQFree "Hong Kong")
--   Just (Coords {lat = 22.264412, long = 114.16706})
--   
request :: Text -> GeoQuery -> IO (Maybe (Coords Float)) -- | Geocoding query parameters data GeoQuery GQ :: Text -> Text -> Text -> GeoQuery -- | Street address (e.g. "Via Irnerio") [gqStreet] :: GeoQuery -> Text -- | City (e.g. "Bologna") [gqCity] :: GeoQuery -> Text -- | Country (e.g. "Italy") [gqCountry] :: GeoQuery -> Text -- | Free-text query (must be a valid address or location) GQFree :: Text -> GeoQuery -- | Coordinates data Coords a Coords :: a -> a -> Coords a -- | Latitude [lat] :: Coords a -> a -- | Longitude [long] :: Coords a -> a