Forums

How to retrieve only published posts or post titles via XML-RPC (3 posts)

  1. frank.quosdorf
    Member
    Posted 3 years ago #

    The XML-RPC API provides several ways to retrieve posts or post titles (blogger.getRecentPosts, metaWeblog.getRecentPosts, mt.getRecentPostTitles), but results contain all posts, including those not published.

    Is there a way to retrieve only published posts/ post titles. If not, how can I determine the status (published, pending review, draft) of a post?

  2. frank.quosdorf
    Member
    Posted 3 years ago #

    Post status can be retrieved using metaWeblog.getRecentPosts as it also contains the attribute post_status. However, this is still inconvenient as a larger list of posts needed to be retrieved and the status checked before displaying published posts.

    I would prefer to apply a filter to the request, and retrieve only published posts via API. Is there a way to apply a filter to the API?

  3. Joseph Scott
    Member
    Posted 3 years ago #

    Currently there are no filter options on metaWeblog.getRecentPosts that would allow you to limit the results in that way.

Topic Closed

This topic has been closed to new replies.

About this Topic