aboutsummaryrefslogtreecommitdiff
path: root/lib/Web/OpenWeatherMap/Types/City.hs
blob: bb6cd6d655740d30504396785f71939407ee33fd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
{-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE DeriveGeneric #-}

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

import GHC.Generics (Generic)

import Data.Aeson (FromJSON)

import Web.OpenWeatherMap.Types.Coord (Coord)

data City = City
  { name :: String
  , country :: Maybe String
  , coord :: Coord
  , timezone :: Int
  , sunset :: Int
  , sunrise :: Int
  } deriving (Show, Generic, FromJSON)