WebService::Hatena::Fotolife - Interface to the Hatena::Fotolife AtomAPI
use WebService::Hatena::Fotolife; my $fotolife = WebService::Hatena::Fotolife->new; $fotolife->username($username); $fotolife->password($password); # create a new entry my $EditURI = $fotolife->createEntry( title => $title, filename => $filename, ); # or pass in the image source as a scalarref my $EditURI = $fotolife->createEntry( title => $title, scalarref => \$image_content, ); # update the entry $fotolife->updateEntry($EditURI, title => $title); # retrieve the feed my $feed = $fotolife->getFeed; my @entries = $feed->entries; ...
WebService::Hatena::Fotolife provides an interface to the Hatena::Fotolife AtomAPI.
This module is a subclass of XML::Atom::Client, so see also the documentation of the baseclass for more usage.
my $fotolife = WebService::Hatena::Fotolife->new;
Creates and returns a WebService::Hatena::Fotolife object.
This method behaves the same as baseclass's one except for setting the UserAgent string "WebService::Hatena::Fotolife/$VERSION".
my $EditURI = $fotolife->createEntry( title => $title, filename => $filename, );
or
my $EditURI = $fotolife->createEntry( title => $title, scalarref => $scalarref, );
Uploads the given image with $title to Hatena::Fotolife. Pass in the image source as a filename or a scalarref to the image content.
This method overrides the baseclass's createEntry method.
my $EditURI = $fotolife->updateEntry($EditURI, title => $title);
Updates the title of the entry at $EditURI with the given $title. Hatena::Fotolife AtomAPI currently doesn't support to update the image content directly by this method.
This method overrides the baseclass's updateEntry method.
my $feed = $fotolife->getFeed;
Retrieves the feed. The count of the entries the $feed includes depends on your configuration of Hatena::Fotolife.
This method overrides the beseclass's getFeed method.
See the documentation of the baseclass XML::Atom::Client.
This module is now in beta version, so the interface it provides may be changed later.
Hatena::Fotolife
http://f.hatena.ne.jp/
Hatena::Fotolife API documentation
http://d.hatena.ne.jp/keyword/%A4%CF%A4%C6%A4%CA%A5%D5%A5%A9%A5%C8%A5%E9%A5%A4%A5%D5AtomAPI
XML::Atom::Client
Kentaro Kuribayashi, <kentarok@gmail.com>
Copyright (C) 2005 by Kentaro Kuribayashi
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install WebService::Hatena::Fotolife, copy and paste the appropriate command in to your terminal.
cpanm
cpanm WebService::Hatena::Fotolife
CPAN shell
perl -MCPAN -e shell install WebService::Hatena::Fotolife
For more information on module installation, please visit the detailed CPAN module installation guide.