Mateu X. Hunter > Weather-WWO-0.04 > Weather::WWO

Download:
Weather-WWO-0.04.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  0
View/Report Bugs
Module Version: 0.04   Source   Latest Release: Weather-WWO-0.07

Name ^

Weather::WWO - API to World Weather Online

Synopsis ^

    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()

Methods ^

forecast_temperatures

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;

highs

Get an ArrayRef[Int] of the forecasted high temperatures.

lows

Get an ArrayRef[Int] of the forecasted low temperatures.

winds

Get an ArrayRef[Int] of the forecasted wind speeds.

get_forecast_data_by_key

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.

query_string

Construct the query string based on object attributes.

query_URL

Construct the to URL to get by putting the source URL and query_string together.

current_conditions

The current conditions data structure.

weather_forecast

The weather forecast data structure.

request

Information about the request.

Authors ^

Mateu Hunter hunter@missoula.org

Copyright ^

Copyright 2010, Mateu Hunter

License ^

You may distribute this code under the same terms as Perl itself.

syntax highlighting: