
WebService::Hatena::Bookmark::Lite - A Perl Interface for Hatena::Bookmark AtomPub API

use WebService::Hatena::Bookmark::Lite;
my $bookmark = WebService::Hatena::Bookmark::Lite->new(
username => $username,
password => $password,
);
### add
my $edit_ep = $bookmark->add(
url => $url,
tag => \@tag_list,
comment => $comment,
);
### edit
@tag = ( qw/ kaka tete /);
$com = 'edit comment';
$bookmark->edit(
edit_ep => $edit_ep,
tag => \@tag ,
comment => $com ,
);
### delete
$bookmark->delete(
edit_ep => $edit_ep ,
);
# Get Feed
my $feed = $bookmark->getFeed();
print $feed->as_xml;

WebService::Hatena::Bookmark::Lite provides an interface to the Hatena::Bookmark AtomAPI.
If you use this module , It is necessary to prepare Hatena ID beforehand.
Hatena ID & password are necessary , when you install this module too. please set ID & password , like following. % export WEBSERVICE_HATENA_BOOKMARK_TEST_USERNAME='your hatenaID' % export WEBSERVICE_HATENA_BOOKMARK_TEST_PASSWORD='your hatenaPassWord'

my $bookmark = WebService::Hatena::Bookmark::Lite->new( username => $username, password => $password, );Creates and returns a WebService::Hatena::Bookmark::Lite Object.
my $edit_ep = $bookmark->add( url => $url, tag => \@tag_list, comment => $comment, );Add Entry of your Hatena::Bookmark. Return EditURI End Point.
my $edit_ret = $bookmark->edit( edit_ep => $edit_ep, tag => \@tag_list, comment => $comment, );Edit exist entry of your Hatena::Bookmark. Return true on success, false otherwise.
my $del_ret = $bookmark->delete( edit_ep => $edit_ep , );Delete exist entry of your Hatena::Bookmark.
my $edit_ep = $bookmark->entry2edit_ep( $entry );Need one parameter. what is XML::Atom::Entry Object. Return EditURI End Point of correct entry. EditURI End Point is unique number of each entry.
my $entry = $bookmark->getEntry( edit_ep => $edit_ep , );Get exist entry of your Hatena::Bookmark. Return XML::Atom::Entry Object.
my $feed = $bookmark->getFeed(); print $feed->as_xml;Get entries of your Hatena::Bookmark. Return XML::Atom::Feed Object.

Masartz <masartz {at} gmail.com>

http://d.hatena.ne.jp/keyword/%A4%CF%A4%C6%A4%CA%A5%D6%A5%C3%A5%AF%A5%DE%A1%BC%A5%AFAtomAPI

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.