Make WordPress Core

Opened 16 years ago

Closed 12 years ago

#6850 closed enhancement (duplicate)

Suggestion: New XMLRPC API for searching posts

Reported by: redsweater's profile redsweater Owned by: josephscott's profile josephscott
Milestone: Priority: normal
Severity: normal Version:
Component: XML-RPC Keywords:
Focuses: Cc:

Description

The limitations of the XMLRPC getRecentPosts API call are often cited as the core limiting factor for many desktop clients. In particular, the fact that only the last "N" posts can be fetched makes it difficult or impossible to provide access to very old posts, without imposing a burden on the server.

A user's request got me thinking and I realized that the API might benefit from a very generalized "search" API that would allow for a huge variety of useful operations without bloating the API namespace too much.

For instance, the search API might take an array of "search parameters", such as:

search string - true if the body, title, etc of a post contains this string
post category/tag - only return posts in a given taxonomy
post status - useful for retrieving a list of only draft or only published items
post id - perhaps a list of post id ranges, so a client could ask for posts {10-15, 18, 21}
post date - a date range e.g. only posts from january-june of 2007
post author - this would be awesome for clients to be able to restrict listings to only the particular author

If the API took a "maximum results" parameter as well, its functionality could match exactly "getRecentPosts", if no search parameters are provided.

I think an API like this could be very powerful and also take the pressure off as far as specific requests for accessors to only get draft posts, etc.

Change History (5)

#1 @redsweater
16 years ago

  • Cc redsweater added

I also think this idea could be extended to the APP implementation. For instance a collection listing could be narrowed down by requesting something like:

GET http://myblog.uri/wp-app.php/posts?status=draft&author=Daniel%20Jalkut

I have pinged the atom-pub email list to see what they all think about this idea as it pertains to APP.

#2 @matt
16 years ago

  • Milestone changed from 2.7 to 2.8

#3 @FFEMTcJ
15 years ago

  • Milestone changed from 2.8 to Future Release

#4 @ryan
14 years ago

Related #10388

#5 @westi
12 years ago

  • Milestone Future Release deleted
  • Resolution set to duplicate
  • Status changed from new to closed

Closing this as a Duplicate of #18433 which has patches and traction for 3.4

Note: See TracTickets for help on using tickets.