﻿id,summary,reporter,owner,description,type,status,priority,milestone,component,version,severity,resolution,keywords,cc
16316,Enable pagination for the XML-RPC getRecentPosts function,feedfabrik,,"To retrieve posts via the XML-RPC API, currently the following methods can be called:
 * blogger.getRecentPosts
 * metaWeblog.getRecentPosts
 * mt.getRecentPostTitles

In changeset r16256 these methods were enhanced to support an optional number of posts. However, the query still always starts from the most recent post and there is no way to retrieve older posts without increasing the optional number of posts to a sufficiently large number and retrieving everything before as well. This can place an unnecessary and unwanted burden on the server.

There is an alternative of requesting a post by ID but for this the ID needs to be known in advance. Until ticket #6850 is addressed, there is no way to query for specific IDs.

I would like to suggest an enhancement that leverages r16256 and introduces another optional parameter for offset.

As an example, the code for blogger_getRecentPosts would get an additional:
{{{
if ( isset( $args[5] ) )
    $query['offset'] = absint( $args[5] );
}}}

That should be enough to get {{{wp_get_recent_posts}}} from {{{post.php}}} do the job.

On more general terms, a new XML-RPC method {{{wp.getPosts}}} could be introduced that simply accepts the array used in {{{wp_get_recent_posts}}} for even more flexibility, but that's probably stuff for another ticket.",enhancement,closed,normal,,XML-RPC,3.1,minor,duplicate,has-patch close,josephscott feedfabrik max@…
