lib/Zeta/plugins/weather.rb in zetabot-2.0.5 vs lib/Zeta/plugins/weather.rb in zetabot-2.0.6
- old
+ new
@@ -128,12 +128,12 @@
object_class: OpenStruct
)
return nil if ac.results.nil? ## Unable to locate
ac = ac.results[0]
- lat = CGI.escape(ac.geometry.location.lat)
- lon = CGI.escape(ac.geometry.location.lng)
+ lat = ac.geometry.location.lat
+ lon = ac.geometry.location.lng
data = JSON.parse(
open("https://api.darksky.net/forecast/#{Config.secrets[:darksky]}/#{lat},#{lon}").read,
object_class: OpenStruct
)
@@ -169,14 +169,14 @@
object_class: OpenStruct
)
return nil if ac.results.nil? ## Unable to locate
ac = ac.results[0]
- lat = CGI.escape(ac.geometry.location.lat)
- lon = CGI.escape(ac.geometry.location.lng)
+ lat = ac.geometry.location.lat
+ lon = ac.geometry.location.lng
stations = JSON.parse(
- open(URI.encode("https://api.weather.gov/points/#{lat},#{lon}/stations/")).read
+ open("https://api.weather.gov/points/#{lat},#{lon}/stations/").read
) rescue nil
return nil if stations.nil? ## Unable to find station. probably not in the USA
parsed = JSON.parse(