Masaru Hoshino > WebService-Hatena-Bookmark-Lite-0.01 > WebService::Hatena::Bookmark::Lite

Download:
WebService-Hatena-Bookmark-Lite-0.01.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  0
Report a bug
Module Version: 0.01   Source   Latest Release: WebService-Hatena-Bookmark-Lite-0.03

NAME ^

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

SYNOPSIS ^

    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;

DESCRIPTION ^

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'

METHODS ^

new

  my $bookmark = WebService::Hatena::Bookmark::Lite->new(
      username  => $username,
      password  => $password,
  );

Creates and returns a WebService::Hatena::Bookmark::Lite Object.

add

  my $edit_ep = $bookmark->add(
      url     => $url,
      tag     => \@tag_list,
      comment => $comment,
  );

Add Entry of your Hatena::Bookmark. Return EditURI End Point.

edit

  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.

delete

  my $del_ret = $bookmark->delete(
      edit_ep  => $edit_ep ,
  );

Delete exist entry of your Hatena::Bookmark.

entry2edit_ep

  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.

getEntry

  my $entry = $bookmark->getEntry(
      edit_ep  => $edit_ep ,
  );

Get exist entry of your Hatena::Bookmark. Return XML::Atom::Entry Object.

getFeed

  my $feed = $bookmark->getFeed();

  print $feed->as_xml;

Get entries of your Hatena::Bookmark. Return XML::Atom::Feed Object.

AUTHOR ^

Masartz <masartz {at} gmail.com>

SEE ALSO ^

LICENSE ^

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