In this video, I would like to introduce the basics and examples of APIs that are often used in the web world.
APIs can expand what you can do with your electronic devices, so please keep them in mind.
-Self introduction
Hardware engineer
9 years experience as a Maker
-SNS
Web : lab-b.jp
Twitter : / buonoatsushi
-Text
First, let's talk about what an API is.
API stands for "application programming interface." Simply put, it is a mechanism that allows service providers to publish a large amount of data on the Internet, which can then be easily used by service users through programs. This system is widely used in the Web world because it is beneficial to both the data providers who want to promote their services and the users who want to add functions to their products or sites.
In general use, users request the information they want from the provider through the Internet, and the provider passes the data to them in response to the request.
For example, using KZitem's API as an example, a request for a channel ID will return a list of the channel's video titles, number of likes, and so on. This data is generally returned in JSON format.
This data is generally in a neatly organized format like JSON, so it is easy to use in programs and can be immediately incorporated into your own services.
Next, how can the API be used in electronic construction? I would like to introduce some examples of how I have used APIs in the past to give you an idea of how they can be utilized in electronic construction.
The first is an IoT globe, an educational gadget for children that allows them to visually understand the rotation of the earth. When the toy globe is rotated, the webcams of the world displayed on the PC change according to the tilt of the earth, and when the globe is rotated around once, the viewer can see a 24-hour view of that location. In this one, it uses an API called webcams.Travel API, and when you request a location, category, etc., it sends you the URL of a day's worth of images that the webcam has stocked accordingly.
Next, I will introduce the API I used when I created a gadget called Mimmy, which watches over children with its voice. This was born out of a parent's desire to give their child as many different adventures as possible and the realization that children often talk and hum even when they are alone. The way it works is that the elephant first chats with the child in chat mode to memorize the child's voice in advance. Then, the elephant's head is attached to the child's clothing as a badge and goes outside to play. Even when the child is playing alone, it will listen to the child's voice and call the parent's phone if the child is lonely or crying.
In this system, three APIs are utilized: a voice API to talk to the child, an Empath API to determine the emotion from the voice, and a twilio API to call the phone. The APIs can be combined in such a way that you can create anything you want to realize, depending on your ideas, so the range of your electronic construction will be completely different if you don't use the APIs.
The key to this system in particular is an API called Empath. When you pass voice data to it, the AI built into the server analyzes the voice for emotion and tells you what kind of emotion it is feeling. It is quite accurate, and I think you can play with this alone quite a bit. There is a free plan that you can use for a trial, so if you are interested, please try it.
Translated with www.DeepL.com/Translator (free version)
Негізгі бет Тәжірибелік нұсқаулар және стиль [Web beginners] What's API? -Useful tool for electronics life-
Пікірлер: 2