-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/
-- | Access data at OpenWeatherMap
--
-- Client library and command-line utility to access OpenWeatherMap
-- https://openweathermap.org
@package openweathermap
@version 0.3.0
module Web.OpenWeatherMap.Types.Clouds
data Clouds
Clouds :: Double -> Clouds
[all] :: Clouds -> Double
instance Data.Aeson.Types.FromJSON.FromJSON Web.OpenWeatherMap.Types.Clouds.Clouds
instance GHC.Generics.Generic Web.OpenWeatherMap.Types.Clouds.Clouds
instance GHC.Show.Show Web.OpenWeatherMap.Types.Clouds.Clouds
module Web.OpenWeatherMap.Types.Coord
data Coord
Coord :: Maybe Double -> Maybe Double -> Coord
[lon] :: Coord -> Maybe Double
[lat] :: Coord -> Maybe Double
instance Data.Aeson.Types.FromJSON.FromJSON Web.OpenWeatherMap.Types.Coord.Coord
instance GHC.Generics.Generic Web.OpenWeatherMap.Types.Coord.Coord
instance GHC.Show.Show Web.OpenWeatherMap.Types.Coord.Coord
module Web.OpenWeatherMap.Types.City
data City
City :: String -> Maybe String -> Coord -> Int -> Int -> Int -> City
[name] :: City -> String
[country] :: City -> Maybe String
[coord] :: City -> Coord
[timezone] :: City -> Int
[sunset] :: City -> Int
[sunrise] :: City -> Int
instance Data.Aeson.Types.FromJSON.FromJSON Web.OpenWeatherMap.Types.City.City
instance GHC.Generics.Generic Web.OpenWeatherMap.Types.City.City
instance GHC.Show.Show Web.OpenWeatherMap.Types.City.City
module Web.OpenWeatherMap.Types.Location
-- | Various ways to specify location.
data Location
-- | City name.
Name :: String -> Location
-- | Geographic coordinates: latitude and longitude.
Coord :: Double -> Double -> Location
instance Servant.Client.Core.HasClient.HasClient m api => Servant.Client.Core.HasClient.HasClient m (Web.OpenWeatherMap.Types.Location.Location Servant.API.Sub.:> api)
module Web.OpenWeatherMap.Types.Main
data Main
Main :: Double -> Double -> Double -> Double -> Double -> Maybe Double -> Maybe Double -> Main
[temp] :: Main -> Double
[pressure] :: Main -> Double
[humidity] :: Main -> Double
[temp_min] :: Main -> Double
[temp_max] :: Main -> Double
[sea_level] :: Main -> Maybe Double
[grnd_level] :: Main -> Maybe Double
instance Data.Aeson.Types.FromJSON.FromJSON Web.OpenWeatherMap.Types.Main.Main
instance GHC.Generics.Generic Web.OpenWeatherMap.Types.Main.Main
instance GHC.Show.Show Web.OpenWeatherMap.Types.Main.Main
module Web.OpenWeatherMap.Formulas
absoluteHumidity :: Main -> Maybe Double
module Web.OpenWeatherMap.Types.Sys
data Sys
Sys :: Maybe String -> Int -> Int -> Sys
[country] :: Sys -> Maybe String
[sunrise] :: Sys -> Int
[sunset] :: Sys -> Int
instance Data.Aeson.Types.FromJSON.FromJSON Web.OpenWeatherMap.Types.Sys.Sys
instance GHC.Generics.Generic Web.OpenWeatherMap.Types.Sys.Sys
instance GHC.Show.Show Web.OpenWeatherMap.Types.Sys.Sys
module Web.OpenWeatherMap.Types.Weather
data Weather
Weather :: Int -> String -> String -> String -> Weather
[id] :: Weather -> Int
[main] :: Weather -> String
[description] :: Weather -> String
[icon] :: Weather -> String
instance Data.Aeson.Types.FromJSON.FromJSON Web.OpenWeatherMap.Types.Weather.Weather
instance GHC.Generics.Generic Web.OpenWeatherMap.Types.Weather.Weather
instance GHC.Show.Show Web.OpenWeatherMap.Types.Weather.Weather
module Web.OpenWeatherMap.Types.Wind
data Wind
Wind :: Double -> Double -> Wind
[speed] :: Wind -> Double
[deg] :: Wind -> Double
instance Data.Aeson.Types.FromJSON.FromJSON Web.OpenWeatherMap.Types.Wind.Wind
instance GHC.Generics.Generic Web.OpenWeatherMap.Types.Wind.Wind
instance GHC.Show.Show Web.OpenWeatherMap.Types.Wind.Wind
module Web.OpenWeatherMap.Types.Forecast
data Forecast
Forecast :: Int -> Clouds -> Main -> [Weather] -> Wind -> Forecast
[dt] :: Forecast -> Int
[clouds] :: Forecast -> Clouds
[main] :: Forecast -> Main
[weather] :: Forecast -> [Weather]
[wind] :: Forecast -> Wind
instance Data.Aeson.Types.FromJSON.FromJSON Web.OpenWeatherMap.Types.Forecast.Forecast
instance GHC.Generics.Generic Web.OpenWeatherMap.Types.Forecast.Forecast
instance GHC.Show.Show Web.OpenWeatherMap.Types.Forecast.Forecast
module Web.OpenWeatherMap.Types.ForecastWeather
-- | Response to requests for forecast weather. Refer to
-- https://openweathermap.org/forecast5.
data ForecastWeather
ForecastWeather :: [Forecast] -> City -> ForecastWeather
[list] :: ForecastWeather -> [Forecast]
[city] :: ForecastWeather -> City
instance Data.Aeson.Types.FromJSON.FromJSON Web.OpenWeatherMap.Types.ForecastWeather.ForecastWeather
instance GHC.Generics.Generic Web.OpenWeatherMap.Types.ForecastWeather.ForecastWeather
instance GHC.Show.Show Web.OpenWeatherMap.Types.ForecastWeather.ForecastWeather
module Web.OpenWeatherMap.Types.CurrentWeather
-- | Response to requests for current weather. Refer to
-- https://openweathermap.org/current.
data CurrentWeather
CurrentWeather :: Coord -> [Weather] -> String -> Main -> Wind -> Clouds -> Int -> Sys -> Int -> Int -> String -> Int -> CurrentWeather
[coord] :: CurrentWeather -> Coord
[weather] :: CurrentWeather -> [Weather]
[base] :: CurrentWeather -> String
[main] :: CurrentWeather -> Main
[wind] :: CurrentWeather -> Wind
[clouds] :: CurrentWeather -> Clouds
[dt] :: CurrentWeather -> Int
[sys] :: CurrentWeather -> Sys
[timezone] :: CurrentWeather -> Int
[id] :: CurrentWeather -> Int
[name] :: CurrentWeather -> String
[cod] :: CurrentWeather -> Int
instance Data.Aeson.Types.FromJSON.FromJSON Web.OpenWeatherMap.Types.CurrentWeather.CurrentWeather
instance GHC.Generics.Generic Web.OpenWeatherMap.Types.CurrentWeather.CurrentWeather
instance GHC.Show.Show Web.OpenWeatherMap.Types.CurrentWeather.CurrentWeather
-- | Direct API functions. For API key (a.k.a appid) refer to
-- http://openweathermap.org/appid.
module Web.OpenWeatherMap.API
currentWeather :: String -> Location -> ClientM CurrentWeather
forecastWeather :: String -> Location -> ClientM ForecastWeather
-- | High-level client functions perfoming requests to OpenWeatherMap API.
module Web.OpenWeatherMap.Client
-- | Make a request to OpenWeatherMap API and return current weather in
-- given location.
getWeather :: String -> Location -> IO (Either ClientError CurrentWeather)
-- | Make a request to OpenWeatherMap API and return forecast weather in
-- given location.
getForecast :: String -> Location -> IO (Either ClientError ForecastWeather)