Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
WhattheWordPressRESTAPI
meansforJavascriptDevelopers
JakeSpurlock
@whyisjake
Hi
Node.js
Wait,what?
FAST
NODE IS
php.JS
WordPress.JS
Chipotle.JS
// Let’s get this burrito bowl going…
chipotle.create({
type: 'bowl',
options: {
rice: 'white',
beans: 'pinto',
meat: 'chi...
WPAPI
WIRED
EXPRESS
https://www.npmjs.com/package/wpapi
github.com/whyisjake/wired-express
CRUD
Build an “App”
10K+CONCURRENT VIEWERS
WIRED.COM LIVEBLOGS
What about
Tumblr?
RE-EVALUATE LIVEBLOGS
Complexity.
Simple
// Let's loop through each one, and add the response to post
meta.
// As we get posts, also push those to the main $posts ...
This is silly.
Make posts,damnit.
Slack
Livebot
Livebotisanodeapplicationthatlistensfor
requestsfromSlackandrespondswithrequests
toaWordPressRESTAPIendpointtomanage
liveb...
Sunstone
•30+years
•3500sessions
•Thousandsofpresenters
Sunstone
JakeSpurlock
@whyisjake
What the WordPress REST API Means for Javascript Developers
What the WordPress REST API Means for Javascript Developers
What the WordPress REST API Means for Javascript Developers
What the WordPress REST API Means for Javascript Developers
What the WordPress REST API Means for Javascript Developers
What the WordPress REST API Means for Javascript Developers
What the WordPress REST API Means for Javascript Developers
What the WordPress REST API Means for Javascript Developers
What the WordPress REST API Means for Javascript Developers
What the WordPress REST API Means for Javascript Developers
What the WordPress REST API Means for Javascript Developers
What the WordPress REST API Means for Javascript Developers
What the WordPress REST API Means for Javascript Developers
What the WordPress REST API Means for Javascript Developers
What the WordPress REST API Means for Javascript Developers
What the WordPress REST API Means for Javascript Developers
What the WordPress REST API Means for Javascript Developers
What the WordPress REST API Means for Javascript Developers
What the WordPress REST API Means for Javascript Developers
Upcoming SlideShare
Loading in …5
×

of

What the WordPress REST API Means for Javascript Developers Slide 1 What the WordPress REST API Means for Javascript Developers Slide 2 What the WordPress REST API Means for Javascript Developers Slide 3 What the WordPress REST API Means for Javascript Developers Slide 4 What the WordPress REST API Means for Javascript Developers Slide 5 What the WordPress REST API Means for Javascript Developers Slide 6 What the WordPress REST API Means for Javascript Developers Slide 7 What the WordPress REST API Means for Javascript Developers Slide 8 What the WordPress REST API Means for Javascript Developers Slide 9 What the WordPress REST API Means for Javascript Developers Slide 10 What the WordPress REST API Means for Javascript Developers Slide 11 What the WordPress REST API Means for Javascript Developers Slide 12 What the WordPress REST API Means for Javascript Developers Slide 13 What the WordPress REST API Means for Javascript Developers Slide 14 What the WordPress REST API Means for Javascript Developers Slide 15 What the WordPress REST API Means for Javascript Developers Slide 16 What the WordPress REST API Means for Javascript Developers Slide 17 What the WordPress REST API Means for Javascript Developers Slide 18 What the WordPress REST API Means for Javascript Developers Slide 19 What the WordPress REST API Means for Javascript Developers Slide 20 What the WordPress REST API Means for Javascript Developers Slide 21 What the WordPress REST API Means for Javascript Developers Slide 22 What the WordPress REST API Means for Javascript Developers Slide 23 What the WordPress REST API Means for Javascript Developers Slide 24 What the WordPress REST API Means for Javascript Developers Slide 25 What the WordPress REST API Means for Javascript Developers Slide 26 What the WordPress REST API Means for Javascript Developers Slide 27 What the WordPress REST API Means for Javascript Developers Slide 28 What the WordPress REST API Means for Javascript Developers Slide 29 What the WordPress REST API Means for Javascript Developers Slide 30 What the WordPress REST API Means for Javascript Developers Slide 31 What the WordPress REST API Means for Javascript Developers Slide 32 What the WordPress REST API Means for Javascript Developers Slide 33 What the WordPress REST API Means for Javascript Developers Slide 34 What the WordPress REST API Means for Javascript Developers Slide 35 What the WordPress REST API Means for Javascript Developers Slide 36 What the WordPress REST API Means for Javascript Developers Slide 37 What the WordPress REST API Means for Javascript Developers Slide 38 What the WordPress REST API Means for Javascript Developers Slide 39 What the WordPress REST API Means for Javascript Developers Slide 40 What the WordPress REST API Means for Javascript Developers Slide 41 What the WordPress REST API Means for Javascript Developers Slide 42 What the WordPress REST API Means for Javascript Developers Slide 43 What the WordPress REST API Means for Javascript Developers Slide 44 What the WordPress REST API Means for Javascript Developers Slide 45 What the WordPress REST API Means for Javascript Developers Slide 46 What the WordPress REST API Means for Javascript Developers Slide 47 What the WordPress REST API Means for Javascript Developers Slide 48
Upcoming SlideShare
Monetize All the Things
Next
Download to read offline and view in fullscreen.

0 Likes

Share

Download to read offline

What the WordPress REST API Means for Javascript Developers

Download to read offline

Slides from my talk at OpenWest 2016 about the WordPress REST API.

Related Books

Free with a 30 day trial from Scribd

See all

Related Audiobooks

Free with a 30 day trial from Scribd

See all
  • Be the first to like this

What the WordPress REST API Means for Javascript Developers

  1. 1. WhattheWordPressRESTAPI meansforJavascriptDevelopers
  2. 2. JakeSpurlock @whyisjake
  3. 3. Hi
  4. 4. Node.js
  5. 5. Wait,what?
  6. 6. FAST NODE IS
  7. 7. php.JS
  8. 8. WordPress.JS
  9. 9. Chipotle.JS
  10. 10. // Let’s get this burrito bowl going… chipotle.create({ type: 'bowl', options: { rice: 'white', beans: 'pinto', meat: 'chicken', salsa: [ 'green', ‘corn' ], cream: true, cheese: true, guacamole: true, notes: 'Extra guac please!’ } });
  11. 11. WPAPI
  12. 12. WIRED EXPRESS
  13. 13. https://www.npmjs.com/package/wpapi
  14. 14. github.com/whyisjake/wired-express
  15. 15. CRUD
  16. 16. Build an “App”
  17. 17. 10K+CONCURRENT VIEWERS WIRED.COM LIVEBLOGS
  18. 18. What about Tumblr? RE-EVALUATE LIVEBLOGS
  19. 19. Complexity.
  20. 20. Simple
  21. 21. // Let's loop through each one, and add the response to post meta. // As we get posts, also push those to the main $posts array. // Reversing this so that we have some better logic for updating posts. // Ideally, you don't need to loop through every page, you could just // update the most recent page or two. for ( $i = 0; $i < $times; $i++ ) { // Fetch a batch of posts $response = $this->fetch_and_parse( $url, $i ); $more_posts = $response['response']['posts']; $more_posts = $this->clean_tumblr_response( $more_posts ); if ( ! empty( $more_posts ) ) { update_post_meta( $post_id, 'liveblog_posts_page_' . $i, $more_posts ); } // Add each of the posts to the main post array. foreach ( $more_posts as $post ) { $posts[] = $post; } }
  22. 22. This is silly.
  23. 23. Make posts,damnit.
  24. 24. Slack
  25. 25. Livebot
  26. 26. Livebotisanodeapplicationthatlistensfor requestsfromSlackandrespondswithrequests toaWordPressRESTAPIendpointtomanage liveblogposts.Theapplicationisbestthoughtof asamiddlewarethattranslatesrequestsbetween theSlackserverandWordPress.Theapplication itselfhasnoexternaldependencies(e.g., database,cache),makingtheapplicationvery easytorun.
  27. 27. Sunstone
  28. 28. •30+years •3500sessions •Thousandsofpresenters Sunstone
  29. 29. JakeSpurlock @whyisjake

Slides from my talk at OpenWest 2016 about the WordPress REST API.

Views

Total views

3,875

On Slideshare

0

From embeds

0

Number of embeds

2,960

Actions

Downloads

1

Shares

0

Comments

0

Likes

0

×