XML::Atom::Lifeblog

XML::Atom::Lifeblog allows you to post lifeblog items using AtomAPI.
Download

XML::Atom::Lifeblog Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Tatsuhiko Miyagawa
  • Publisher web site:
  • http://search.cpan.org/~miyagawa/

XML::Atom::Lifeblog Tags


XML::Atom::Lifeblog Description

XML::Atom::Lifeblog allows you to post lifeblog items using AtomAPI. XML::Atom::Lifeblog allows you to post lifeblog items using AtomAPI.SYNOPSIS use XML::Atom::Lifeblog; my $client = XML::Atom::Lifeblog->new(); $client->username("Melody"); $client->password("Nelson"); my $entry = $client->postLifeblog($PostURI, $title, $body, "foobar.jpg"); my $media = XML::Atom::Lifeblog::Media->new(content => $data); my $entry = $client->postLifeblog($PostURI, $title, $body, $media);XML::Atom::Lifeblog is a wrapper for XML::Atom::Client that handles Nokia Lifeblog API to post images associated with text messages.METHODSXML::Atom::Lifeblog is a subclass of XML::Atom::Client.postLifeblog my $entry = $client->postLifeblog($PostURI, $title, $body, $media);Creates a new Lifeblog entry and post it to a Lifeblog aware server using element. $media is either a XML::Atom::Lifeblog::Media object, or a filepath of media file to be posted.Returns XML::Atom::Entry object for the posted entry.There're several ways to create Media object. At least you should specify how to fetch media data. filename, filehandle or content. # create Media object # Content-Type is auto-guessed and media title is auto-determined my $media = XML::Atom::Lifeblog::Media->new(filename => "foo.jpg"); my $media = XML::Atom::Lifeblog::Media->new(filehandle => $fh); my $media = XML::Atom::Lifeblog::Media->new(content => $data);If you omit other parameters like type and title, they're automatically guessed and generated using MIME type and file magic. If you want to specify them explicitly, you can do this like: my $media = XML::Atom::Lifeblog::Media->new( filehandle => $fh, type => "video/3gpp", title => "My dog.3gp", ); # Then post it with $title & $body to $PostURI my $entry = $client->postLifeblog($PostURI, $title, $body, $media); Requirements: · Perl


XML::Atom::Lifeblog Related Software