Aaron Straup Cope > Net-Blogger-0.8.1 > Net::Blogger::Engine::Movabletype::mt

Download:
Net-Blogger-0.8.1.tar.gz

Dependencies

Annotate this POD

CPAN RT

New  2
Open  2
View Bugs
Report a bug
Module Version: 0.2   Source   Latest Release: Net-Blogger-1.02

NAME ^

mt - Adds support for the MovableType XML-RPC API

SYNOPSIS ^

 use Net::Blogger;
 
 use Carp;
 use Data::Dumper;

 my $mt = Net::Blogger->new(engine=>"movabletype");
  
 $mt->Proxy("http://yaddayadda.com/mt-xmlrpc.cgi");
 $mt->Username("asc");
 $mt->Password("*****");
 $mt->BlogId(123);
  
 $mt->newPost(postbody=>\&fortune(),publish=>1)
   || croak $mt->LastError();
  
 my $id = $mt->metaWeblog()->newPost(title=>"test:".time,
                                     description=>&fortune(),
                                      publish=>1)
   || croak $mt->LastError();
    
 my $categories = $mt->mt()->getCategoryList()
   || croak $mt->LastError();
  
 my $cid = $categories->[0]->{categoryId};
    
 $mt->mt()->setPostCategories(postid=>$id,
                              categories=>[{categoryId=>$cid}])
   || croak $mt->LastError();
  
 print &Dumper($mt->mt()->getPostCategories(postid=>$id));
  
 sub fortune {
   local $/;
   undef $/;
  
   system ("fortune > /home/asc/tmp/fortune");
  
   open F, "</home/asc/tmp/fortune";
   my $fortune = <F>;
   close F;
  
   return $fortune;
 }

DESCRIPTION ^

Adds support for the MovableType XML-RPC API

OBJECT METHODS ^

$pkg->getCategoryList()

Returns an array ref of hash references.

$pkg->getPostCategories(%args)

Valid arguments are

Returns an array ref of hash references

$pkg->setPostCategories(%args)

Valid argument are

Returns true or false

$pkg->getTrackbackPings(\%args)

Returns an array reference of hash references who keys are :

$pkg->supportMethods()

Returns an array reference.

VERSION ^

0.2

DATE ^

June 27, 2002

AUTHOR ^

Aaron Straup Cope

SEE ALSO ^

Net::Blogger::Engine::Base

http://www.movabletype.org/mt-static/docs/mtmanual_programmatic.html#xmlrpc%20api

LICENSE ^

Copyright (c) 2002, Aaron Straup Cope. All Rights Reserved.

This is free software, you may use it and distribute it under the same terms as Perl itself.