WebService::Livedoor::Weather - Perl interface to Livedoor Weather Web Service
use utf8; use WebService::Livedoor::Weather; binmode STDOUT, ':utf8'; $lwws = WebService::Livedoor::Weather->new; my $ret = $lwws->get('東京'); # forecast data for Tokyo. ### or ... $ret = $lwws->get('130010'); # '130010' is Tokyo's city_id. printf "%s\n---\n%s\n", $ret->{title}, $ret->{description};
WebService::Livedoor::Weather is a simple interface to Livedoor Weather Web Service (LWWS)
$lwws = WebService::Livedoor::Weather->new; $lwws = WebService::Livedoor::Weather->new(fetch=>{ Cache=>$c });
creates an instance of WebService::Livedoor::Weather.
fetch is option for URI::Fetch that used for fetching weather information.
fetch
my $ret = $lwws->get('63'); #63 is tokyo my $ret = $lwws->get('cityname');
retrieve weather. You can get a city id from http://weather.livedoor.com/forecast/rss/primary_area.xml
URI::Fetch http://weather.livedoor.com/weather_hacks/webservice.html (Japanese)
Original version by Masahiro Nagano, <kazeburo@nomadscafe.jp>
Latest version by Satoshi Azuma, <ytnobody@gmail.com>
Copyright (C) 2006 by Masahiro Nagano
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.5 or, at your option, any later version of Perl 5 you may have available.
2 POD Errors
The following errors were encountered while parsing the POD:
'=item' outside of any '=over'
You forgot a '=back' before '=head1'
To install WebService::Livedoor::Weather, copy and paste the appropriate command in to your terminal.
cpanm
cpanm WebService::Livedoor::Weather
CPAN shell
perl -MCPAN -e shell install WebService::Livedoor::Weather
For more information on module installation, please visit the detailed CPAN module installation guide.