I would like to retrieve all posts of a blog via the XML-RPC API of WordPress.
There are the methods of blogger.getRecentPosts
and metaWeblog.getRecentPosts
which – given a sufficiently high value as number of posts (or -1) in theory should return all posts.
However, this does not work for very large blogs or very weak servers that cannot hold the whole blog in memory. In that case, these functions will not return anything at best or throw an error into the response XML.
A solution would be to retrieve smaller chunks of, e.g. 50, posts at a time and put it all together on the receiving side. For this to work one would need to specify an offset for the posts to get. I was not able to find a way to specify such an offset in the documented API.
Is there any way to make this work, either by specifying an offset or by using other than the methods mentioned above?
I’m not looking for a description on how to write a plugin or modify WordPress itself in any way. I can do that, sure, but I’m talking about authorized retrieval of data of arbitrary WordPress blogs.
Edit: I’ve opened a trac ticket at WordPress with a suggestion for solution: http://core.trac.wordpress.org/ticket/16316