Successfully reported this slideshow.
Playing Nice with OthersIntegrating WordPress with External APIs   Eric Mann  @ericmann  http://about.me/eam       WordC...
Integrating WordPress with External APIs•   Background•   Technologies in use•   Available tools•   Practical Examples•   ...
BACKGROUND
TECHNOLOGIES
ReST
XML-RPC
JSON
TOOLS
WP_Httpwp_remote_post( $url, $args );wp_remote_get( $url, $args );wp_remote_head( $url, $args );wp_remote_request( $url, $...
wp_xmlrpc_serveradd_filter( xmlrpc_methods, wcphx_add_method );function wcphx_add_method( $methods ) {   $methods[wcphx.sa...
EXAMPLES
Twitter - ReSTGEThttp://search.twitter.com/search.json?q=%23wcphx&rpp=5&include_entities=false&result_type=recent
Extending XMLRPCadd_filter( xmlrpc_methods, wcphx_add_method );
QUESTIONS?
Upcoming SlideShare
Loading in …5
×

Playing nice with others

1,457 views

Published on

XML-RPC and WP_Http presentation from WordCamp Phoenix.

Published in: Technology, Design
  • Be the first to like this

Playing nice with others

  1. 1. Playing Nice with OthersIntegrating WordPress with External APIs Eric Mann  @ericmann  http://about.me/eam WordCamp Phoenix  February 26, 2012
  2. 2. Integrating WordPress with External APIs• Background• Technologies in use• Available tools• Practical Examples• Questions
  3. 3. BACKGROUND
  4. 4. TECHNOLOGIES
  5. 5. ReST
  6. 6. XML-RPC
  7. 7. JSON
  8. 8. TOOLS
  9. 9. WP_Httpwp_remote_post( $url, $args );wp_remote_get( $url, $args );wp_remote_head( $url, $args );wp_remote_request( $url, $args );wp_remote_retrieve_body( $response );wp_remote_retrieve_header( $response, $header );wp_remote_retrieve_headers( $response );wp_remote_retrieve_response_code( $response );wp_remote_retrieve_response_message( $response );
  10. 10. wp_xmlrpc_serveradd_filter( xmlrpc_methods, wcphx_add_method );function wcphx_add_method( $methods ) { $methods[wcphx.sayHello] = wcphx_sayHello; return $methods;}function wcphx_sayHello( $args ) { return Hello!;}
  11. 11. EXAMPLES
  12. 12. Twitter - ReSTGEThttp://search.twitter.com/search.json?q=%23wcphx&rpp=5&include_entities=false&result_type=recent
  13. 13. Extending XMLRPCadd_filter( xmlrpc_methods, wcphx_add_method );
  14. 14. QUESTIONS?

×