
WebService::Hatena::Exist - Interface to the HATENA exist API

This documentation refers to WebService::Hatena::Exist version 0.02

#! /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);

"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.

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.
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.
$h->target_url('http://search.cpan.org/');You can change target url on this method.
$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.
$h->bookmark;Count of Bookmark can be acquired.
$h->antenna;Count of Antenna can be acquired.
$h->diary;Count of Diary can be acquired.
$h->parse_ref;HASH Ref of Hatena Exist Feed can be acquired.
$h->feed;Feed of Hatena Exist can be acquired.
This parse_feed method is called from get_feed method. This method use XML::Simple.

strict,warnings,Class::ErrorHandler,URI::Fetch::SimpleCache,XML::Simple,Readonly


There are no known bugs in this module. Please report problems to Atsushi Kobayashi (<nekokak@cpan.org>) Patches are welcome.

Atsushi Kobayashi, <nekokak@cpan.org>

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.