The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

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

VERSION

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

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 $whe->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 $ua = LWP::UserAgent->new;
    
    my $h = WebService::Hatena::Exist->new(
        url => 'http://www.hatena.ne.jp/',
        ua  => $ua,
    );

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.

OPTIONS

    url ,It's that wants to investigate. ua is LWP::UserAgent's object.

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

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.orgE>). 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.

2 POD Errors

The following errors were encountered while parsing the POD:

Around line 243:

'=item' outside of any '=over'

Around line 250:

You forgot a '=back' before '=head1'