0

Is there a solution or a way to consume an external web service API (could be JSON or SOAP) to be able populate/update a wordpress blog ? For example using wikipedia api to pull content that wikipedia.com has on the topic the post is about. I tried searching this topic alot online and all i found was how to create a API out of already exisitng posts in wordpress.

Any suggestions or ideas ?

1 Answer 1

1

You can use the HTTP API in combination with the Transient API, and of course you would most likely need to parse what you want. As for what to do with the data you will have to provide a more specific example, there are many actions, functions, and conditional parameters.

2
  • thanks for suggestion @Wyck , however the "Transint API" is just for caching data in wordpress, is their a method or function to be able to publish/post the data as the wordpress post ?
    – eddywebs
    Commented Nov 4, 2011 at 17:16
  • The transient API is typically used for external API's since the data is dynamic, one of the reason API's exist in the first place is because the data is itself transient. As for saving it as a post, have a look at some action filters, codex.wordpress.org/Plugin_API/Action_Reference
    – Wyck
    Commented Nov 4, 2011 at 20:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.