Last active
September 24, 2018 10:03
-
-
Save harrisonmalone/abc1534cf928ff450a0a896063ba25a9 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'forecast_io' | |
ForecastIO.api_key = ENV.fetch('DARK_SKY_API_KEY') | |
puts ENV['DARK_SKY_API_KEY'] | |
lat = -37.815712 | |
long = 144.955546 | |
forecast = ForecastIO.forecast(lat, long) | |
puts forecast[:hourly][:data][0][:summary] | |
# puts "long = #{forecast.longitude}" | |
# puts "lat = #{forecast.latitude}" | |
# stuff that was put into bash, remember that you need to be in the same bash terminal to do stuff | |
# export DARK_SKY_API_KEY="what dark sky give you" | |
# echo $DARK_SKY_API_KEY |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment