Forecast IO v2 api wrapper for Scala
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Forecast IO v2 API wrapper in scala

I know there are at least two Java wrappers, but this will feel cleaner to anyone working on a Scala project and needs weather data.

This is also completely immutable and thread-safe!

Review API Spec for specifics:

##Quick Examples:

###Standard US

val forecastIO = ForecastIO("my api key")

val Success(forecast) = forecastIO.forecast("45.157778", "-93.226944")

forecast.currently.summary //=> "Mostly Cloudy"


val forecastIO = ForecastIO("my api key", "si")


It's hard to just "know" the location points, so you can grab a location using the google maps API

val Success(location) ="salt lake city utah")
val Success(forecast) = forecastIO.forecast(location)

forecast.currently.apparentTemperature //=> "58.89"


You can also get a forecast from a prior or future date.

val date = new Date(1265076122 * 1000L) //=> Feb 2, 2010
val Success(forecast) = forecastIO.forecast("45.157778", "-93.226944", date)