Weather 0.1.0.2 → 0.1.0.3
raw patch · 4 files changed
+10/−4 lines, 4 files
Files
- Weather.cabal +1/−1
- Weather.cabal~ +1/−1
- src/Net/Weather.hs +7/−1
- src/Net/Weather.hs~ +1/−1
Weather.cabal view
@@ -2,7 +2,7 @@ -- documentation, see http://haskell.org/cabal/users-guide/ name: Weather-version: 0.1.0.2+version: 0.1.0.3 synopsis: Library for interacting with the Weather Underground JSON API. description: Weather is a simple library for interacting with the Weather Underground JSON API. It is not complete, but it may be useful still. homepage: https://github.com/bstamour/weather
Weather.cabal~ view
@@ -20,7 +20,7 @@ exposed-modules: Net.Weather -- other-modules: -- other-extensions:- build-depends: base >= 4.7.0+ build-depends: base == 4.* , HTTP >= 4000.2.12 , text >= 1.1.0 , unordered-containers >= 0.2.5
src/Net/Weather.hs view
@@ -39,8 +39,14 @@ -- | API key. Obtain yours at http://wunderground.com. type APIKey = String +-- | City name (e.g. Detroit).+type City = String++-- | State abbreviation (e.g. MI for Michigan).+type State = String+ -- | Get the current weather conditions of a city.-getConditions :: APIKey -> String -> String -> IO (Maybe Observation)+getConditions :: APIKey -> City -> State -> IO (Maybe Observation) getConditions key city state = do obj <- evalJSONRequest $ conditionsQuery key city state return $ obj >>= getProperty "current_observation"
src/Net/Weather.hs~ view
@@ -1,6 +1,6 @@ {-# LANGUAGE OverloadedStrings #-} -module Web.Weather+module Net.Weather ( Observation(..) , APIKey , getConditions