2
votes

I am using the JoeBlogs .Net wordpress wrapper by Alex James Brown. It just essentially makes all of the XML RPC calls available to .Net.

I have been using the GetRecentPosts(5) call, e.g. "Grab the 5 most recent posts", but this returns everything from the entire blog.

What if I want to simply grab the latest posts within Category X?

E.g. I want GetRecentPosts("My Category", 5);

Is this possible with the current XML RPC API?

I really don't want to have to resort to pulling down 20 ALLRecentPosts and then sub-filtering by category, because that will be so inefficient, as I will have one site calling the blog site to fetch this data..

Many thanks.

1
Yes- This isn't a method supported by the XML RPC Wordpress API I plan to add a plugin to extend the xmlrpc methods, and add these extensions to JoeBlogs at some point Feel free to mail me to get involved with contributing! - Alex

1 Answers

1
votes

I don't think there is a default XML-RPC method that does this. However, you can add new methods by hooking into Wordpress's xmlrpc_methods filter (see below), although presumably that would mean you'd also have to add some code to your .Net wrapper.

add_filter('xmlrpc_methods', 'add_xmlrpc_method');

function add_xmlrpc_method($methods) {
    $methods['foo'] = 'bar';
    return $methods;
}

function bar($args) {
    …
}