Slide 1

Slide 1 text

by Rodrigo Donini @donini PUBLISH A POST SCREAMING WordCamp New York 2018

Slide 2

Slide 2 text

Hire the top 3% of freelance talent www.toptal.com Toptal Confidential HELLO! I’m Donini You can find me on Twitter, GitHub and LinkedIn as @donini My Site / Blog: www.donini.me Apply for Toptal: http://bit.ly/donini-toptal

Slide 3

Slide 3 text

Hire the top 3% of freelance talent www.toptal.com Toptal Confidential WordCamp Buenos Aires - AR WordCamp San José - CR WordCamp Toronto - CA WordCamp Porto Alegre - BR Where I live São Leopoldo MORE THEN 37 THOUSAND MILES (+68 thousand kilometers) TO ATTEND WORDCAMPS WordCamp São Paulo - BR WordCamp Miami - US WordCamp New York - US

Slide 4

Slide 4 text

@donini

Slide 5

Slide 5 text

Hire the top 3% of freelance talent www.toptal.com Toptal Confidential Hire the 3% of the best freelancers in the world. WHO IS http://bit.ly/donini-toptal @donini

Slide 6

Slide 6 text

Hire the top 3% of freelance talent www.toptal.com Toptal Confidential ! The challenges ! Landscape ! References ! Overview of the REST-API ! Decibel-meter Package ! Live code ! Live preview Agenda @donini

Slide 7

Slide 7 text

Hire the top 3% of freelance talent www.toptal.com Toptal Confidential The Main Challenges @donini • Consume and show a practical example of using the WP REST API • Interact with the audience somehow.

Slide 8

Slide 8 text

Hire the top 3% of freelance talent www.toptal.com Toptal Confidential Landscape (The Premise) @donini The audience make some noise (Scream for example) If the system reach a number of decibels A new post will be published through the REST API

Slide 9

Slide 9 text

Hire the top 3% of freelance talent www.toptal.com Toptal Confidential Quick overview of the REST-API @donini Characteristics of the WordPress REST API: 1) It’s possible manipulate posts, custom-posts, pages, categories, tags, comments, taxonomies, media, users and settings; 2) Uses the HTTP methods to transmit data, like POST, GET, PUT, DELETE; 3) Don’t need extra knowledge of PHP.

Slide 10

Slide 10 text

Hire the top 3% of freelance talent www.toptal.com Toptal Confidential Using the REST-API @donini Endpoints to manipulate posts: Create: POST /wp/v2/posts Update: POST /wp/v2/posts/ Delete: DELETE /wp/v2/posts/ List: GET /wp/v2/posts Restore: GET /wp/v2/posts/ https://developer.wordpress.org/rest-api/reference/posts/

Slide 11

Slide 11 text

Hire the top 3% of freelance talent www.toptal.com Toptal Confidential @donini https://developer.wordpress.org/rest-api/reference/posts/ In this project we used two Endpoints To create the post in WordPress: Create: POST /wp/v2/posts To upload the media file: Create: POST /wp/v2/media

Slide 12

Slide 12 text

Hire the top 3% of freelance talent www.toptal.com Toptal Confidential Some applications of the REST-API @donini 1) Build websites or webapps using React.js, Angular.js, Vue.js, etc; 2) Build mobile apps using Java (Android), Swift (iOS), etc; 3) Integrate with any device that supports REST APIs;

Slide 13

Slide 13 text

Hire the top 3% of freelance talent www.toptal.com Toptal Confidential Decibel-meter Package @donini 1) Connects in audio devices; 2) Process and capture the decibels;

Slide 14

Slide 14 text

Hire the top 3% of freelance talent www.toptal.com Toptal Confidential References and Libs @donini 1) Project in Github - https://github.com/donini/scream-and-post 3) WP REST API - https://developer.wordpress.org/rest-api/reference/ 4) Decibel-meter npm package - https://www.npmjs.com/package/decibel-meter 5) Express npm package - http://expressjs.com/ 6) Gifshot - https://github.com/yahoo/gifshot

Slide 15

Slide 15 text

Hire the top 3% of freelance talent www.toptal.com Toptal Confidential Live code @donini

Slide 16

Slide 16 text

Hire the top 3% of freelance talent www.toptal.com Toptal Confidential Live preview @donini http://rest.donini.me/

Slide 17

Slide 17 text

THANKS! You can find me on Twitter, GitHub and LinkedIn as @donini My Site / Blog: www.donini.me QUESTIONS? Apply to Toptal: http://bit.ly/donini-toptal

Slide 18

Slide 18 text

Hire the top 3% of freelance talent www.toptal.com Toptal Confidential FTM & CoffeePress @donini http://bit.ly/coffeepressyt