the Blogger, Movable Type and MetaWeblog XMLRPC APIs

The first XMLRPC blog API was the Blogger API which was very limited – you could create and edit very simple representations of posts. This was extended by both Movable Type and MetaWeblog, adding more complicated post types (you could set titles, keywords categories, etc) and the ability to get a list of posts available on the server. All of these APIs have their own namespaces, their own variable name prefixes, and varying support from clients. An example

  • metaWeblog.getCategories ( MetaWeblog API )

    metaWeblog.getCategories (blogid, username, password) returns struct

    The struct returned contains one struct for each category,
    containing the following elements: description, htmlUrl and rssUrl.

  • mt.getCategoryList ( Movabletype API )

    Description: Returns a list of all categories defined in the weblog.

    Parameters: String blogid, String username, String password

    Return value: on success, an array of structs containing String
    categoryId and String categoryName; on failure, fault.

Because you don’t know which clients will be making which calls, you need to implement both. Further, the MetaWeblog API doesn’t support post excerpts or extended content, but the MovableType API extends certain MetaWeblog calls with extra parameters to get and set these properties.

Essentially, if you have a blog that supports excerpts, keywords – anything other than posts with a title and content – then you need to implement all of the APIs. Then you find that some clients have arbitrarily decided that the blogid parameter must be an integer, despite the specs explicitly giving it a ‘String’ type.

It all works in the end, though.

This post has been spillover from a post on the Zimki blog about implementing the MetaWeblog API on Zimki. As the Zimki blog has a very simple post structure at the moment (just titles and content right now, although annoyingly we use a markup engine that no GUI client understands) I could get away with a nice basic implementation of just the core MetaWeblog API, and so a rant about the complexity of the APIs didn’t really seem to fit there. Having written it, though, I felt it should go somewhere, and I did run into all these issues writing the jerakeen.org MetaWeblog server.