Clojure library for retrieving data from the Forecast API
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src/forecast_clojure
.gitignore
README.md
project.clj

README.md

forecast-clojure

A Clojure library for retrieving data from the darksky.net API.

Installation

forecast-clojure is available as a Maven artifact from Clojars:

[forecast-clojure "1.0.4"]

Configuration

The library fetches your darksky.net 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

Usage

(require '[forecast-clojure.core :refer :all])

(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 darksky.net API documentation for information on the full response properties.

License

Copyright © 2016 J.D. Hollis

Distributed under the Eclipse Public License, the same as Clojure.