aboutsummaryrefslogtreecommitdiff
path: root/lib/Web/OpenWeatherMap/Types/City.hs
blob: 4ca30bdc38374e6e031ec2ed6030d55f13ab378c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
{-# 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)