[wp-xmlrpc] exposing draft posts and listing all posts
Joseph Scott
joseph at randomnetworks.com
Wed Jul 9 21:07:48 GMT 2008
When a post is started in wp-admin and saved as a draft, it doesn't
appear to ever get exposed via any of the current XML-RPC methods.
If you happen to know the post_id for a draft you can still get at it
with metaWeblog.getPost, but finding out about that post in the first
place is the problem. Since we now expose the post_status field I
don't see why metaWeblog.getRecentPosts couldn't include drafts as
well. Anyone have objections/concerns to that?
Along with this I've been thinking about the situation with getting
recent posts. Seems like it would be handy to have a way to get all
of the valid post_id's, along with a little bit of info about each,
say the date_created_gmt and post_status fields. Like this:
[
1: {
date_created_gmt: 20080706T00:43:55,
post_status: draft
},
22: {
date_created_gmt: 20080706T00:43:55
post_status: publish
}
]
The index would be the post_id, with then a tiny bit of info about
each post. Since this could potentially be a pretty long list of
data (for blogs with 10,000+ posts) the amount of data besides the
post_id should be kept to a minimum. My first thought was to do
nothing but provide an array of post_ids, but then thought that was
probably a bit too sparse.
--
Joseph Scott
joseph at randomnetworks.com
http://joseph.randomnetworks.com/
More information about the wp-xmlrpc
mailing list