Welcome to brand new section.
And that is Web API.
If you choose to become a front end developer, you need to understand what is web API, meaning how
we can consume API.
Likewise, fullstack developers and then back in developers.
This chaos is really important.
But before we get into that, let's look at the projects that you'll be building while exploring web
APIs.
And the first project is what you call battery application.
And for this, I use the built in API call battery to develop this application.
And this project give more information about your battery in your operating system.
So for me, my battery level is 100% meaning that it is fully charged and we have what is called charging
state and indeed I am charging.
So charging is.
Yes, and then the charging time and then in discharging time minus infinity seconds.
So if I unplug my charger, you're going to see charging to be false.
But because I am using a mac desktop, if I unplug my charger, my screen will be off.
So this is a project that will be built in.
The next one is what we call Get My Location.
And for this I use the geolocation API to build this one and as soon as I click on get my location and
you can see that it has given me my current location and it gives me more details about where I am right
now.
The next project is how to make a HTTP request, and for this one we are going to use the built in API
called fetch.
So when I click on fetch post, let's see the post that we are going to get and you can see that we
go back list of posts from different server.
The next project is what we call task manager application and for this one we are going to use the local
storage to build this.
So let's have a look.
When I add a task, for example, coding and I hit enter, we can see that it has been added to my list
and next week I'm going to be studying and then let's say walk in and so on and so forth and I can go
ahead and then delete these tasks.
Let me add more in the mix.
For example, studying like that and if I refresh my page, you can see that it still persists, meaning
that it's been saved into the local storage of my browser.
So to prove to you if I check my local storage and you can see that this is the to dos, I have our
task.
I have.
And if I add a new task, put your I here is going to be added and I call this one as shopping and I'll
hit enter and you can see that it has been added inside my local storage.
So this is the application that we are going to build while exploring the Web API.
So in this video, let's dive in and explain what is API.