Writing a blog using mobile blog applications is about to get much better with the expected release of WordPress 3.4 which offers some long awaited improvements of the WordPress XMLRPC API.
The new set of XMLRPC methods is primarily aimed at enabling mobile blog apps and other clients the ability to support custom posts and taxonomies that is now de rigour is themes and plugins and includes:
- wp.getPosts
- wp.getTaxonomies
- wp.getTaxonomy
- wp.getTerm
- wp.deleteTerm
- wp.editTerm
- wp.getTerms
- wp.getPostTypes
- wp.getPostType
This new set of methods brings the WordPress API out from under the shadow of blogger, metaWeblog and MovableType APIs and moves the WordPress API into a class of its own. They will enable mobile apps to move beyond supporting lowest common denominator functionality of simple posts and start supporting the full power of WordPress which is its extensibility through themes and plugins.
The wp.getPosts method is a great addition to the API and supports filters. The big bugbear with metaWeblog.getRecentPosts was that it did not support an offset. This meant that if you wanted to see the 1000th post you had to get all 1000 posts. This issue is fixed in wp.getPosts which supports filters such as post_type, post_status, number (of posts to retrieve), and offset.
Another important addition to the API for mobile blog apps is the addition of feature image support for blog posts. This will be well received by the community in general but will be particular welcomed by the photo blogging community.
Media Library support was added in 3.01 with the addition of wp.getMediaLibrary and wp.getMediaItem but did not include the attachment Id which prevented the ability to edit or delete library items. The 3.4 API fixes this deficiency. Another nice fix is the addition of default image size, comment and ping status in wp.getOptions method.
The one problem that I see in the new API is that the response to wp.getPostType does not give any details on the custom fields associated with a post type. We must therefore ask how can we collect data through the mobile interface if we don’t know what data (custom fields) to collect? Frustratingly, if you do know what the custom fields are and collect the data it can be published using by wp.newPost and the new wp.getPosts returns all custom fields.
This means that we will be able to edit posts with custom fields but not, at least easily, create new posts with custom fields.
Take for example, a blog that has the Yoast, search engine optimisation plugin(SEO) installed which enables the definition of meta title and meta description (and optionally meta keywords.) When adding a new post, the back-end provides “meta boxes” for the collection of the title, description and keywords. However, the new set of XMLRPC methods will not provide the necessary information indicating the availability or requirement of these SEO custom fields. That is, support for the Yoast plugin would have to be hard coded into the mobile client.
If custom field (and meta box) information was provided in the wp.getPostType response it would be now easy for blog apps and other mobile and desktop clients to fully support any plugin or theme. That is, mobile devices would be able to support the full extensibility of the WordPress platform.
A big thanks needs to go Max Cutler, Joseph Scott and Andrew Nacin for the significant advancement of the WordPress XMLRPC API.

