Kedar Warriner > WebService-Blogger > WebService::Blogger

Download:
WebService-Blogger-0.22.tar.gz

Dependencies

Annotate this POD

CPAN RT

New  1
Open  0
View/Report Bugs
Module Version: 0.22   Source  

NAME ^

WebService::Blogger - Interface to Google's Blogger service

############################################################################# This module is currently under modifications by a new author in order to support Google's new authentication method.

Standby for updates #############################################################################

SYNOPSIS ^

This module provides interface to the Blogger service now run by Google. It's built in object-oriented fashion with Moose, which makes it easy to use and extend. It also utilizes newer style GData API for better compatibility. You can retrieve list of blogs for an account, add, update or delete entries.

 use WebService::Blogger;

 my $blogger = WebService::Blogger->new(
     login_id   => 'myemail@gmail.com',
     password   => 'mypassword',
 );

 my @blogs = $blogger->blogs;
 foreach my $blog (@blogs) {
     print join ', ', $blog->id, $blog->title, $blog->public_url, "\n";
 }

 my $blog = $blogs[1];
 my @entries = $blog->entries;

 my ($entry) = @entries;
 print $entry->title, "\n", $entry->content;

 $entry->title('Updated Title');
 $entry->content('Updated content');
 $entry->categories([ qw/category1 category2/ ]);
 $entry->save;

 my $new_entry = WebService::Blogger::Blog->add_entry(
     title   => 'New entry',
     content => 'New content',
     blog    => $blog,
 );
 $new_entry->delete;

METHODS ^

new

 my $blogger = WebService::Blogger->new(
     login_id   => 'myemail@gmail.com',
     password   => 'mypassword',
 );

Connects to Blogger, authenticates and returns object representing Blogger account. The credentials can be given in named parameters or read from a configuration file which has contents like this:

 username = someone@gmail.com
 password = somepassword

The file is first searched for as $ENV{WEBSERVICE_BLOGGER_CONFIG} then as "$ENV{HOME}/.www_blogger_rc". On Windows, please use the first format.

The file must not be accessible by anyone but the owner. Module will die with an error if it is. Authentication token received will be stored privately and used in all subsequent requests.

blogs

Returns list of blogs for the account, as either array or array reference, depending on the context. Items are instances of WebService::Blogger::Blog.

AUTHOR ^

Kedar Warriner, <kedar at cpan.org>

BUGS ^

Comments are currently not supported.

Please report any bugs or feature requests to bug-webservice-blogger at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=WebService-Blogger. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

SUPPORT ^

You can find documentation for this module with the perldoc command.

    perldoc WebService::Blogger

You can also look for information at:

ACKNOWLEDGEMENTS ^

 Many thanks to:
  - Egor Shipovalov who wrote the original version of this module
  - Everyone involved with CPAN.

LICENSE AND COPYRIGHT ^

Copyright 2010 Kedar Warriner.

This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.

See http://dev.perl.org/licenses/ for more information.

syntax highlighting: