GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  NET::BLOGGER::ENGINE::MOVABLETYPE::MT (3)

.ds Aq ’

NAME

mt - Adds support for the MovableType XML-RPC API

CONTENTS

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

CW$obj->getRecentPostTitles(\%args)

Valid arguments are :
o <B>countB>

Int.

The number of post titles to fetch. Default is 20

o <B>ascB>

Boolean.

As in: return data ordered by ascending date. By default, items are returned ’most recent first’.

Returns an array ref of hash refs. Each hash ref contains the following keys :
o <B>postidB>
o <B>useridB>
o <B>titleB>

String.

o <B>dateCreatedB>

String, formatted as a W3CDTF datetime.

This method was introduced in Net::Blogger 0.86 and does <B>notB> accept arguments passed as a list. They <B>mustB> be passed by reference.

CW$obj->getCategoryList()

Returns an array ref of hash references.

CW$obj->getPostCategories(\%args)

Valid arguments are
o <B>postidB>

String. required

Releases prior to Net::Blogger 0.85 accepted a list of arguments rather than a reference. Version 0.85+ are backwards compatible.

Returns an array ref of hash references

CW$obj->setPostCategories(\%args)

Valid argument are
o <B>postidB>

String. Required

<B>categoriesB>

Array ref. required

The MT docs state that :
o The array categories is an array of structs containing
o <B>categoryIdB>

String.

o <B>isPrimaryB>

Using isPrimary to set the primary category is optional—in the absence of this flag, the first struct in the array will be assigned the primary category for the post

Releases prior to Net::Blogger 0.85 accepted a list of arguments rather than a reference. Version 0.85+ are backwards compatible.

Returns true or false

CW$obj->getTrackbackPings(\%args)

o *

<B>postidB>

String.

Returns an array reference of hash references who keys are :
o pingTitle
o pingURL
o pingIP
Releases prior to Net::Blogger 0.85 accepted a list of arguments rather than a reference. Version 0.85+ are backwards compatible.

CW$obj->supportMethods()

Returns an array reference.

CW$obj->publishPost($postid)

Returns true or false.

VERSION

1.0

DATE

$Date: 2005/03/26 19:29:08 $

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-2005, Aaron Straup Cope. All Rights Reserved.

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

Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 NET::BLOGGER::ENGINE::MOVABLETYPE::MT (3) 2016-04-04

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.