Download & Install the JSON API Plugin
The plugin is available at the WordPress website:
http://wordpress.org/extend/plugins/json-api/
Download and install from the WordPress Admin interface.
Configure the Plugin
The plugin features three main functionality:
Core: Basic methods for pulling standard post/category/tag/etc. data.
Posts: Provides additional functionality with regard to posts, including post creation.
Respond: Provides comment and trackback submission methods.
Most people will only need the “Core” method enabled. Advanced users can have a shot at post and comment management.
Using the Plugin
The plugin has a billion uses and methods, all of which are documented at the following address:
http://wordpress.org/extend/plugins/json-api/other_notes/
A few of the more useful methods include pulling all categories…
1 2 3 4 5 6 7 8 9 10 11 12 |
/* url ?json=get_category_index */ { "status": "ok", "count": 3, "categories": [ { ... }, { ... }, { ... } ] }//.... |
…and retrieving all posts in a given category…
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
/* url ?json=get_category_posts&slug=mootools */ { "status": "ok", "count": 10, "count_total": 79, "pages": 7, "category": { ... } "posts": [ { ... }, { ... }, ... ] }//.... |
…or just grabbing recent posts:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
/* url ?json=get_recent_posts&count=10 */ { "status": "ok", "count": 10, "count_total": 79, "pages": 7, "posts": [ { ... }, { ... }, ... ] }//.... |
=======
Taken from: https://davidwalsh.name/wordpress-json-plugin
Comments are closed, but trackbacks and pingbacks are open.