 Thank you so much. So it's an honor to me to stay here. It's my first time at word camp Miami. And probably already seen that my native language is not English. I live in Brazil, in the south of Brazil, so my main language is portuguese. So forgive me for some of the mistakes i may do on this Talk. So i will talk a little about me. And i will speak about how to integrate the wordpress Rest api with some device, like a hatch bar pie. So i live in south of brazil, as i say. I am a developer. I am a teacher. I am a father. I am a husband. I work almost ten years with wordpress, like anyone. It's a normal life, like any other type of life. So this is a small information. Last year i traveled around these places, talking in some Word camps around the world. This is my life during my days. Where we work with my son. Drinking a chimarrón, driving my bike, with my dog, And so on. I work at toptow. Toptow is a global network with the best freelancers on the Entire world. We have designers, Developers, and financial experts. So if someone wants to have more information about toptow, you Can reach me over the talk, and you can click on the link And apply if you want. So we don't have time to lose. Let's go to the main topic of this talk. This is our agenda. I will explain to you each one of These topics. What are the challenges, The landscape, a huge view of this project, the reference i Have used, and a little overview about the rest api. I will talk about the package i have used to get the Disables that you may do on the screen. I will do a live call to explain the project, and of course a Live preview. So my main challenge is Try to show to everyone that it's possible to use the rest Api with someone else like not only react application or Angular application or any kind of jes application. So i try to use this with some device, and interactly with Somehow with the audience that i have here today. So to do this, i think in this landscape. So the main idea is to ask you to scream as loud as you Can, something. Okay. And this little camera will capture the decibels, and if You reach, we reach a certain number. The hasper pie will publish a post on my website with some Information and with some pictures that this webcam will Take. So this is the main idea. Okay. Let's see if this is work. I tested there, and it works. I think it worked as well. So a quick overview about the rest api and the possibilities That we have with the rest api. Normally the people that use the rest api of wordpress use to create some Frontend application for mobile device, stuff like this. Normally using angular, react, view, and any other kind of These modern javascript frameworks in these days. With the rest api, it's possible to do almost anything we can do With wordpress back end. So we can create posts, custom Posts, taxonomies, configure options and customizations, And so on. So the rest api uses normally the HTTP methods like post, get, and put, and delete to do the actions inside the wordpress. And you don't need to know anything about php language. You just need to know javascript to use the rest api. So i have used inside this hasper pie only javascript to do this task. Okay. And i will show to you how this works. So the rest api of wordpress, it's very simple. It's similar to any other rest api. We can create something. We can update something. We can delete something. We can list topics. And i have used two end points for this Presentation. The first one is to the End point for posts. And the second one is to the Media end point to upload the picture this camera will take. Okay. I'll already talk about this. Okay. I search on the web and try to find a Package that can capture the song, the songs or the noises That i have in some environment. And i found the Disable meter package. This is a normal npm package. Okay. I just installed this directly on my Hasper pie. And it works as well. Here is some references about the libraries or the stuffs i Have used to build this project. Okay. So this project is on github, on my profile. It's the first link there. I have used the rest api of Npm. I have used the db package meter. I have used the express package of npm to run on the Raspberry pi, a local server. And i have used this gift Shot. This is a javascript framework that Can get the pictures of this camera and create a small Gift with this framework. And i can do what i want to do With this framework. So i will show you the code Because it's important to understand. I don't know if everyone can read? No. It's too small. I think so. Let me see. Where is this? Where is the size? Thank you. It's better? Okay. So as i talk with you, it's simple. I have many assets here. This is only the css. There is nothing different there. Image. And the javascript part. So i create these main two functions. The first one is to take a shot using this camera. Here i am using the gift shot framework. And here i start a process to listen to the songs that will be Made for you guys during the presentation. So here is another method to use with the db package meter. Here is the framework. Here is the recipe. Here is the comments that i use to post this result on my Wordpress website. So here i publish the post. I have some types of ajax. I just call an ajax with the Prudentials. And here i use to upload the image. It's very similar. I just need to append more Informations like the title of the media and the base 64 content To publish inside the environment. And what else? oh. I think that's it. This is the main idea of the project. So let's run and see what's happened. So let's see if everything is running here. It's okay. So when i start, we can start like a 50 to test. And when i click on the start, listen, it's important to all of You scream something like word came miami and rise our hands Because this will be a record and we go to my website. Okay. So are you ready? Okay. So let's go. Word came miami. No, no, no. Let's try something like third. I think this is okay. Okay, ready, set, go. Word came miami. I think it works. I think it works. Let's see if the camera is working. Yeah, it's working. Probably this will take some time, like a minute or something Like this, because i am using my elite and elite network. And there is the image. Cool. Cool. So let me see if it works. Okay. Not yet, but it's coming. Okay. We don't have errors, so it's coming. But it needs to work. Probably is my connection, because i am using my cell phone Connection to connect the Raspberry Pi in my computer In my own network. So let's see. Not yet in the camera. Stop it. Okay. Let's try one more time. Okay. It's early in the morning. You have breath to scream. Okay. I was set to third again. Ready? Okay, set, go. Word came miami. Yeah, it works. Okay. So probably now it's working. The picture is taking. Yeah. Yeah. Probably. Yeah. Awesome. It works. So if you want to see the result, You can reach this link. And you see your picture there and the value of your The decibels you reach. Okay. Yeah. Now it works. So this is the review. That's it. It's very simple. So as you can see, you just need Something like eight hours. I think i have used eight hours To build this stuff. I get my Raspberry Pi, Install the hpbm, the os, and get some reference about the Civil package, install in this small device, this Small device here. And all of this works. So anyone have any questions regarding to this presentation? Did you like it? Yeah. Any questions? Go ahead. No. No. Using for a final client, Do you mean? No, no. I don't have made anything like this till now. Yeah. Only this. Yeah. Here? Yeah, yeah. Yes, yes. Ask again. Use like a special plug-in in order to use the api, so i'm Not sure if that's stated. No, yeah. I understood. No. The api, now it's inside The wordpress car. You don't need to install Anything else to use it. If you install the last Version of wordpress, you have the rest api. Yeah. Any else? Any other questions? There. Okay. How i handle the Authentication to post using the rest api. I have used a plug-in to do this test for me. I am using the simple authentication or something like This. The name of the plug-in is, Let's see, jzone-based authentication. The first one. Here. So you just need to Install and use any user that have admin Predation, the admin role inside your system to post stuff there. Any else? Nope. So, thank you. I will be the happiness By if someone wants to talk with me. Thank you. Wonderful. Yeah. Well, are you playing around? Who's playing around with rest free pies here? All right. Okay.