Kentaro Kuribayashi > WebService-Hatena-Fotolife-0.01 > WebService::Hatena::Fotolife

Download:
WebService-Hatena-Fotolife-0.01.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  0
Report a bug
Module Version: 0.01   Source   Latest Release: WebService-Hatena-Fotolife-0.02

NAME ^

WebService::Hatena::Fotolife - Interface to the Hatena::Fotolife AtomAPI

SYNOPSIS ^

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

DESCRIPTION ^

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.

METHODS ^

new

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

createEntry ( %param )

  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.

updateEntry ( $EditURI, %param )

  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.

getFeed

  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.

use_soap ( [ 0 | 1 ] )

username ( [ $username ] )

password ( [ $password ] )

getEntry ( $EditURI )

See the documentation of the baseclass XML::Atom::Client.

CAVEAT ^

This module is now in beta version, so the interface it provides may be changed later.

SEE ALSO ^

AUTHOR ^

Kentaro Kuribayashi, <kentarok@gmail.com>

COPYRIGHT AND LICENSE ^

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.