Crystal implementation of the DarkSky weather API
Based primarily the Go implementation.
- Add the dependency to your
shard.yml
:
dependencies:
dark-sky:
github: dscottboggs/dark-sky
- Run
shards install
require "dark-sky"
DarkSky.api_key = ENV["darksky_api_key"]? || "your-api-key-here"
weather = DarkSky::Forecast.new(longitude: -58.47028, latitude: -34.52959)
weather.retreive.currently # current weather
weathe.at 1.day.from_now # weather tomorrow.
- Fork it (https://github.com/dscottboggs/dark-sky/fork)
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request
- D. Scott Boggs - creator and maintainer