The JSON Content Importer allows you to easily import, cache and display livedata via a JSON-Feed on your website.
see also here: The purpose of the plugin
Example 2: Show API JSON Data in WordPress with the Plugins JsonContentImporter PRO and Toolset
Example 3: list of the currently nationwide best selling books
Jenny is managing the WordPress-website of a local public library. She’d like to include a list of the currently nationwide best selling books.
Herefore, she has two options:
- manually update this list every now and then
- or she connects her WordPress to a datasource providing this list.
The second option is much more convenient, but requires some initial work.
First Jenny has to find a fitting datasource – and well, the New York Times offers such a service: Via http://developer.nytimes.com/ docs you can get access to lots of data. One is http://api.nytimes.com/svc/books/v3/lists/hardcover-fiction.json?api-key=sample-key
This data is packaged as JSON, a machine readable format and ideal for exchanging data.
This way of offering data is called API or Application Programming Interface.
The question is: How can Jenny connect this JSON-feed to her WordPress-website?
Here the JSON-Content-Importer Plugin comes into the game: Jenny downloads and installs the free version and inserts the following code into her wordpress-page:
We have a Problem with JSON here:
Either we got no JSON from the API. Or the basenode-parameter is not ok.
Switch on the Debugmode of the Plugin!
This shows the top 5 of the NYT-bestseller list like this (see live data here):
That was easy and Jenny is happy to have spared herself hours and hours of work over the months.
Complex applications can be created with the PRO-Version of the plugin and an API: