Movable Type User Manual: PROGRAMMATIC INTERFACES

« Table of Contents


PROGRAMMATIC INTERFACES

XML-RPC API

Movable Type features a full implementation of the Blogger XML-RPC API (where applicable). The only two methods that are not supported by Movable Type are getTemplate and setTemplate, due to the differences between Blogger's template system and Movable Type's template system.

Movable Type also supports the metaWeblog XML-RPC API (also where applicable).

Finally, Movable Type also adds a couple of other methods of its own for manipulating the categories assigned to your entries.

Usage of any of these XML-RPC APIs requires that your webserver have both LWP::UserAgent and SOAP::Lite installed; if yours does not, the Installation Instructions can tell you how to install them.

Following are the XML-RPC methods supported by Movable Type:

NOTE: the value of appkey is ignored by Movable Type in all of the Blogger XML-RPC methods.

You can use Movable Type's XML-RPC implementation with existing tools like w.bloggar, BlogApp, BlogLet, BlogBuddy, Jericho, etc. For example, to set up BlogBuddy to post to your Movable Type weblog, follow these instructions:

  1. Download BlogBuddy from http://blogbuddy.sourceforge.net/. Unpack the archive, and install the application.

  2. Open the BlogBuddy application.

  3. Select General Settings from the Settings menu. On the General tab, enter your Movable Type username in UserName, and your password in Password.

  4. In the Remote Host tab, enter the name of the host where your version of Movable Type is installed into Host name, and the path to mt-xmlrpc.cgi into Endpoint. For example, if mt-xmlrpc.cgi is located at http://www.foo.com/bar/mt-xmlrpc.cgi, you should enter www.foo.com into Host name, and /bar/mt-xmlrpc.cgi into Endpoint. If your webserver runs on a port other than 80, you should also change the port setting.

  5. In the Blogs tab, click the Update blogs button; BlogBuddy will contact Movable Type on your webserver, and ask it for a list of weblogs which you have access to (using getUsersBlogs, above).

  6. You can now post to your Movable Type weblog(s) using BlogBuddy's posting interface.

Perl API

The Movable Type code is written in an object-oriented style and contains a well-documented Perl API that you can use in your own Perl programs. The documentation itself is in POD format and is contained within the .pm files. You can read this documentation from the shell using the perldoc command. For example:

% cd <movable type directory>/lib
% perldoc MT

Plugins

Movable Type's plugin framework makes it easy to add new tags to the system. In the future, more callback functionality will be added.

Plugin files are Perl scripts placed in a special directory; when Movable Type is initalized, it loads all of the plugins, which can modify the Movable Type code and system at runtime. Only files with .pl extensions are considered plugins and loaded automatically.

Your plugins directory should be placed in the same directory as mt.cgi.

To create that directory, connect to your FTP server, and open the directory where you installed Movable Type. Create a new directory called plugins.

Plugin tags could be written to display RSS feeds, display server status information, implement a hit counter, etc. You can download plugins from http://www.movabletype.org/resources.shtml.


Copyright © 2001-2003 Six Apart. All Rights Reserved.