NAME
Yahoo::Weather - Perl extension to Find Current Observation WEATHER and Two Day Forecast for a given Location or ZIP CODE.
- This module also gives you the sugestions based on Location Name or Zip, it gives you GEOGRAPHICAL DETAILS.
=head1 SYNOPSIS
use Yahoo::Weather;
$obj=Yahoo::Weather->new();
$obj->getWeatherByLocation($place);
$obj->getWeatherByLocation($zip);
$obj->getSugestions($zip);
$obj->getSugestions($loc);
DESCRIPTION
Documentation for Yahoo::Weather. This module will get you Weather for 4.5 Million Locations (approx) but one at a time either by ZIPCODE or Place Name.
Create an Object for Yahoo::Weather.
Yahoo::Weather->new();
Get Weather Details Based on Location Name
$obj->getWeatherByLocation($place);
Get Weather Details Based on Zip Code
$obj->getWeatherByLocation($zip);
Get Weather Details Based on Location Name in FAH
$obj->getWeatherByLocation($place,f);
Get Weather Details Based on Zip Code
$obj->getWeatherByLocation($zip,F);
Default is Cel and for FARENHEIT only pass 'f' or 'F' as last parameter or else it defaults to Celsius.
Get GEOGRAPHICAL Sugestions based Zip Code or Place Name
$obj->getSugestions($zip);
$obj->getSugestions($loc);
In above mentioned methods gives you a HASHREF as return value unless some thing goes wrong.
In case of exceptions, we get following
LOCATION_EMPTY = -1
INVALID_LOCATION = -2
INVALID_ZIP = -2
ZIP_EMPTY = -1
WEATHER_FORECAST_NOT_AVAILABLE = -3
INVALID_KEYWORD = -4 -For Getting Sugestions
SUGESTIONS_NOT_AVAILABLE = -4 For Getting Sugestions
EXPORT
None by default.
SEE ALSO
LWP::Simple http://search.cpan.org/~gaas/libwww-perl-5.837/lib/LWP/Simple.pm
XML::Simple http://search.cpan.org/~grantm/XML-Simple-2.18/lib/XML/Simple.pm
Please Go through YDN(http://developer.yahoo.com) as it is built using it.
If you cant Find Weather for Particular Location , Please refer to http::/weather.yahoo.com
Feed Provider is Weather.com
This module needs to be extended further like getting temp of Today only and Forecast of NexDay only etc...When I have time I will defnetly extend it.
Please Note That curently if you give incorrect place name it will not give you weather Details or if that particular location is available in our 4.5 million locations it will end up giving those details.
Also this module can't be used more than 1000 times an Hour, As it was the restriction from YDN.
This can be overcome in next Release by adding a method to query the licenced URLS of YDN. This means that you will have to get license your self from YDN(http://developer.yahoo.com) and pass them as parametrs to subroutines.
AUTHOR
Krishna Chaitanya Averineni, <krishna_averineni@yahoo.co.in>
COPYRIGHT AND LICENSE
Copyright (C) 2010 by Krishna Chaitanya Averineni
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.8 or, at your option, any later version of Perl 5 you may have available.