A Clojure library for retrieving data from the forecast.io API.
forecast-clojure
is available as a Maven artifact from Clojars:
[forecast-clojure "1.0.3"]
The library fetches your forecast.io API key from the environment using Environ. You can set your key in one of two ways.
In ~/.lein/profiles.clj
:
{:user {:env {:forecast-key "insert-your-api-key-here"}}}
Or, set it as an environment variable:
FORECAST_KEY=insert-your-api-key-here
(require '[forecast-clojure.core :as forecast])
(forecast "37.8267" "-122.423")
(forecast "37.8267" "-122.423" :time 1362974400)
(forecast "37.8267" "-122.423" :params {:units "si" :exclude "daily,alerts" :callback "..."})
Please refer to the forecast.io API documentation for information on the full response properties.
Copyright © 2013 J.D. Hollis
Distributed under the Eclipse Public License, the same as Clojure.