summaryrefslogtreecommitdiff
path: root/blaweather.rb
diff options
context:
space:
mode:
authorJoe Robinson <joe@lc8n.com>2016-09-21 13:57:54 +0100
committerJoe Robinson <joe@lc8n.com>2016-09-21 13:57:54 +0100
commite3393ce78adb8d4780f0e7040439816c56d7fb12 (patch)
tree66d1ceb5512bd7362dae855e99adcd3fe6066f3a /blaweather.rb
parent537d43739339805f6530e202a8270e4653be7788 (diff)
Update to new API URL on darksky.net
Diffstat (limited to 'blaweather.rb')
-rw-r--r--blaweather.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/blaweather.rb b/blaweather.rb
index e539e6b..9aca1ec 100644
--- a/blaweather.rb
+++ b/blaweather.rb
@@ -1,7 +1,7 @@
require 'rest-client'
require 'json'
-VERSION = "2.0"
+VERSION = "2.0.1"
def get_location location
url = "https://maps.googleapis.com/maps/api/geocode/json?address="
@@ -13,7 +13,7 @@ def get_location location
end
def get_weather lat, long
- url = "https://api.forecast.io/forecast/"
+ url = "https://api.darksky.net/forecast/"
api_key = "f1ce0bcdc3d972bc0529bb353f8ec02a"
response = RestClient.get(url+api_key+"/"+lat.to_s+","+long.to_s+"?units=si")
@data = JSON.parse response