[wp-hackers] Help with the API on WordPress.org?

Mike Schinkel mikeschinkel at gmail.com
Fri Jan 2 01:06:43 GMT 2009


On Thu, Jan 1, 2009 at 7:29 PM, DD32 <wordpress at dd32.id.au> wrote:

> Also, For future reference, I've stored my reply of the API here:
> http://dd32.id.au/wordpressorg-plugin-information-api-docs/
>

Just a quick related question, any reason the API is not more RESTful?

In case you'll not familar with the arcane details of RESTfulness, instead
of using $_POST['action'] why not instead use URLs as nouns and use GET to
retrieve? For example, instead of POSTing to
http://api.wordpress.org/plugins/info/1.0/ with an action of 'query_plugins'
instead you would simple GET a URL like this:
http://restapi.wordpress.org/info/1.0/plugins.json?q=category where this
would hypothetically return a list of plugins by category in JSON format.

Without putting my "RESTful Zealot" hat on (which I do have :-) and
preaching all the benefits of real RESTfulness (vs. RPC over HTTP) I'll just
say that what I just proposed would be a lot easier to work with by people
wanting to use the API because they could do their testing using the
browser.

BTW, this is something I'd be willing to work on if it was something that WP
team would consider.

-Mike Schinkel
http://mikeschinkel.com


More information about the wp-hackers mailing list