Weather::WWO - API to World Weather Online
Get the 5-day weather forecast: my $wwo = Weather::WWO->new( api_key => $your_api_key, location => $location, temperature_units => 'F', wind_units => 'Miles'); Where the $location can be: * zip code * IP address * latitude,longitude my ($highs, $lows) = $wwo->forecast_temperatures;
NOTE: api_key and location are required parameters to new()
new()
Get the high and low temperatures for the number of days specified.
Returns: Array of two ArrayRefs being the high and low temperatures Example: my ($highs, $lows) = $wwo->forecast_temperaures;
Get an ArrayRef[Int] of the forecasted high temperatures.
Get an ArrayRef[Int] of the forecasted low temperatures.
Get an ArrayRef[Int] of the forecasted wind speeds.
Get the values for a single forecast metric. Examples are: tempMinF, tempMaxC, windspeedMiles etc...
NOTE: One can dump the data attribute to see the exact data structure and keys available.
Construct the query string based on object attributes.
Construct the to URL to get by putting the source URL and query_string together.
The current conditions data structure.
The weather forecast data structure.
Information about the request.
Mateu Hunter hunter@missoula.org
hunter@missoula.org
Copyright 2010, Mateu Hunter
You may distribute this code under the same terms as Perl itself.
To install Weather::WWO, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Weather::WWO
CPAN shell
perl -MCPAN -e shell install Weather::WWO
For more information on module installation, please visit the detailed CPAN module installation guide.