Code: Select all
https://weather.visualcrossing.com/VisualCrossingWebServices/rest/services/timeline/${arg}/next5days?key=YOUR_API_KEY
Code: Select all
https://weather.visualcrossing.com/VisualCrossingWebServices/rest/services/timeline/${arg}/next5days?key=YOUR_API_KEY
Code: Select all
### The Third Proc for 3 days Forecast
proc ::Visualcrossing::forecast_weather {nick uhost hand chan arg} {
set forecast_data [::Visualcrossing::download_weather https://weather.visualcrossing.com/VisualCrossingWebServices/rest/services/timeline/${arg}/next3days?[http::formatQuery unitGroup metric key $::Visualcrossing::key]]
if {$arg == ""} { putserv "PRIVMSG $chan :Sintax: !3 location" ; return }
set forecast_dict [::json::json2dict $forecast_data]
set desc [dict get $forecast_data description]
putserv "PRIVMSG $chan :TEST $desc"
}
Code: Select all
?[http::formatQuery unitGroup metric key $::Visualcrossing::key]
Code: Select all
?[::http::formatQuery unitGroup metric key $::Visualcrossing::key]
as it seems to have an equal number of keys and values.::http::formatQuery key value ?key value ...?
Code: Select all
set forecast_data [::Visualcrossing::download_weather https://weather.visualcrossing.com/VisualCrossingWebServices/rest/services/timeline/${arg}/next3days?unitGroup=metric&key=$::Visualcrossing::key]