Unofficial Konfabulator Wiki
Register
Advertisement


CDYNE is a website with many free and commercial Web services. CDYNE Weather is a free Web Service that provides you with weather information for the United States.

As needed by Murrah on the forums, I wrote a script to contact the CDYNE Weather web service and parse its response. It only supports GetCityForecastByZIP.

In the future, I'd like to make SOAP code generic enough to work with any web service. It would take a WDSL as input and make all its requests available as methods.

Usage[]

The function to call is:

CDYNE.getForecast(ZIP [, callback]);

ZIP has to be a valid US zipcode.

If a callback is not given (or null, or false), the request will be synchronous, and the forecast will be returned by getForecast directly. This is not recommended, because the widget would hang while waiting for the server. Example:

var data = CDYNE.getForecast(12345);

If a callback is given, the request is asynchronous. The forecast data will be passed as first parameter to the callback when the request ends:

CDYNE.getForecast(12345, function(data) { ... });

Download[]

The script may be copied from the /Code subpage and pasted into a file.

Advertisement