NAME
WebService::SimpleAPI::Wikipedia - Handle WikipediaAPI of SimpleAPI
SYNOPSIS
use strict;
use warnings;
use WebService::SimpleAPI::Wikipedia;
my $api = WebService::SimpleAPI::Wikipedia->new;
my $res = $api->api({ keyword => 'Google', search => 1 });
print $res->nums, ' Results\n';
for my $r (@{ $res }) {
print $r->language;
print $r->id;
print $r->url; # URI Object
print $r->url->host;
print $r->url->path;
print $r->title;
print $r->body;
print $r->length;
print $r->redirect;
print $r->strict;
print $r->datetime; # DateTime Object
print $r->datetime->year;
print $r->datetime->month;
print $r->datetime->day;
}
my $api = WebService::SimpleAPI::Wikipedia->new({ quiet => 1 });
my $json = $api->api({ keyword => 'Google', search => 1, output => 'json' });
DESCRIPTION
The content of Wikipedia concerning the specified key word is made a digest and it returns it. Detailed explanation is http://wikipedia.simpleapi.net/. (Japanese)
Methods
AUTHOR
Kazuhiro Osawa <ko@yappo.ne.jp>
SEE ALSO
http://wikipedia.simpleapi.net/
LICENSE
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.