aboutsummaryrefslogtreecommitdiff
path: root/lib/Web/OpenWeatherMap/Types/CurrentWeather.hs
blob: 26572a74672aa687b0d8b5267280264812ed9ed6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
{-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE DeriveGeneric #-}

module Web.OpenWeatherMap.Types.CurrentWeather (
  CurrentWeather(..)
) where

import Prelude hiding (id)
import GHC.Generics (Generic)

import Data.Aeson (FromJSON)

import Web.OpenWeatherMap.Types.Clouds (Clouds)
import Web.OpenWeatherMap.Types.Coord (Coord)
import Web.OpenWeatherMap.Types.Main (Main)
import Web.OpenWeatherMap.Types.Sys (Sys)
import Web.OpenWeatherMap.Types.Weather (Weather)
import Web.OpenWeatherMap.Types.Wind (Wind)

-- | Response to requests for current weather.
-- Refer to <https://openweathermap.org/current>.
data CurrentWeather = CurrentWeather
  { coord :: Coord
  , weather :: [Weather]
  , base :: String
  , main :: Main
  , wind :: Wind
  , clouds :: Clouds
  , dt :: Int
  , sys :: Sys
  , id :: Int
  , name :: String
  , cod :: Int
  } deriving (Show, Generic, FromJSON)