NAME
WebService::Hatena::Exist - Interface to the HATENA exist API
VERSION
This documentation refers to WebService::Hatena::Exist version 0.02
SYNOPSIS
#! /usr/bin/perl -w
use strict;
use WebService::Hatena::Exist;
use Data::Dumper;
my $h = WebService::Hatena::Exist->new(
url => 'http://www.hatena.ne.jp/',
);
if ( ! $h->get_feed ) {
print $h->errstr;
exit;
}
print $h->target_url , "\n";
print "feed\n";
print $h->feed,"\n";
print "bookmark\n";
print $h->bookmark,"\n";
print "antenna\n";
print $h->antenna,"\n";
print "diary\n";
print $h->diary,"\n";
print Dumper($h->parse_ref);
DESCRIPTION
"WebService::Hatena::Exist" provides an interface to the HATENA exist API. HATENA exist API is REST API. To use HATENA exist API easily, this is made.
METHOD
new
my $h = WebService::Hatena::Exist->new(
url => 'http://www.hatena.ne.jp/',
ua => $ua, # LWP's object
Cache => $ca, # Cache::Cache's object
Cache_root => '',
Cache_default_expires => '',
);
Creates and returns new WebService::Hatena::Exist object. If you have already had LWP::UserAgent's object, LWP::UserAgent's object can be used by WebService::Hatena::Exist. If you have already had Cache::Cache's object, Cache::Cache's object can be used by WebService::Hatena::Exist.
OPTIONS
url ,It's that wants to investigate. ua is LWP::UserAgent's object. Cache is Cache::Cache's object. Cache_root is Cache::Cache's local cache path. Cache_default_expires is cache time.
target_url
$h->target_url('http://search.cpan.org/');
You can change target url on this method.
get_feed
$h->get_feed;
You can get Hatena exist feed on this method. This method executes parse_feed method. And, bookmark, antenna, diary, parse_ref, and feed are set.
bookmark
$h->bookmark;
Count of Bookmark can be acquired.
antenna
$h->antenna;
Count of Antenna can be acquired.
diary
$h->diary;
Count of Diary can be acquired.
parse_ref
$h->parse_ref;
HASH Ref of Hatena Exist Feed can be acquired.
feed
$h->feed;
Feed of Hatena Exist can be acquired.
parse_feed
This parse_feed method is called from get_feed method. This method use XML::Simple.
DEPENDENCIES
strict,warnings,Class::ErrorHandler,URI::Fetch::SimpleCache,XML::Simple,Readonly
SEE ALSO
Hatena exist API
http://d.hatena.ne.jp/keyword/%a4%cf%a4%c6%a4%caexist%20API
BUGS AND LIMITATIONS
There are no known bugs in this module. Please report problems to Atsushi Kobayashi (<nekokak@cpan.org>) Patches are welcome.
AUTHOR
Atsushi Kobayashi, <nekokak@cpan.org>
COPYRIGHT AND LICENSE
Copyright (C) 2005 by Atsushi Kobayashi (<nekokak@cpan.org>). All rights reserved.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic.