NAME
Weather::NWS::NDFDgenByDay - Object interface to the NWS NDFDgenByDay Web Service.
VERSION
Version 0.02
SYNOPSIS
use Weather::NWS::NDFDgenByDay;
my $NDFDgenByDay = Weather::NWS::NDFDgenByDay->new();
my $NDFDgenByDay = Weather::NWS::NDFDgenByDay->new(
'Format' => 'Day',
'Latitude' => 42,
'Longitude' => -88,
);
my $latitude = 42;
$NDFDgenByDay->set_latitude($latitude);
$latitude = $NDFDgenByDay->get_latitude();
my $longitude = -88;
$NDFDgenByDay->set_longitude($longitude);
$longitude = $NDFDgenByDay->get_longitude();
my $format = 'Day';
$NDFDgenByDay->set_format($format);
$format = $NDFDgenByDay->get_format();
my $start_date = scalar localtime;
$NDFDgenByDay->set_start_date($start_date);
$start_date = $NDFDgenByDay->get_start_date();
my $num_days = 3;
$NDFDgenByDay->set_set_number_of_days($num_days);
$num_days = $NDFDgenByDay->get_number_of_days();
my $xml = $NDFDgenByDay->get_forecast_xml();
my $xml = $NDFDgenByDay->get_forecast_xml(
'Format' => 'Day',
'Latitude' => 42,
'Longitude' => -88,
);
my @formats = $NDFDgen->get_available_formats();
NDFDgenByDay
METHODS
BUILD (new)
Constructor for new NDFDgenByDay objects. If called with no parameters, it will return a new object initialized with the 'Day' format, the current date as the start date, and the default number of days equal to one. All other parameters are left unintialized. Values can be provided for 'Latitude', 'Longitude', 'Format', 'Start Time', and 'Number of Days'.
set_latitude
Sets the latitude for the object. This is a decimal value.
get_latitude
Returns the latitude stored in the object.
set_longitude
Sets the longitude for the object. This is a decimal value.
get_longitude
Returns the longitude stored in the object.
set_format
Sets the format for the object. This is either 'Day' or 'Half-Day'.
get_format
Returns the format stored in the object.
set_start_date
Sets the start date for the object.
get_start_date
Gets the start date stored in the object.
set_number_of_days
Sets the number of days for the object. This is an integer value between 1 and 7.
get_number_of_days
Returns the number_of_days stored in the object.
get_available_formats
Return a list of all formats available through this service.
get_forecast_xml
Return the NWS NDFD XML as described in http://products.weather.gov/PDD/Extensible_Markup_Language.pdf. The data returned depends on the state of the NDFDgenByDay object at the date of the call to this method. Any parameters can be overridden by being passed in as arguments to this method.
AUTHOR
Josh McAdams, <josh dot mcadams at gmail dot com>
BUGS
Please report any bugs or feature requests to bug-weather-nws-ndfdgenbyday at rt.cpan.org
, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Weather-NWS-NDFDgenByDay. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
SUPPORT
You can find documentation for this module with the perldoc command.
perldoc Weather::NWS::NDFDgenByDay
You can also look for information at:
AnnoCPAN: Annotated CPAN documentation
CPAN Ratings
RT: CPAN's request tracker
http://rt.cpan.org/NoAuth/Bugs.html?Dist=Weather-NWS-NDFDgenByDay
Search CPAN
ACKNOWLEDGEMENTS
COPYRIGHT & LICENSE
Copyright 2006 Josh McAdams, all rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.