In this tutorial, we continue our exploration of APIs and promises by fetching data from the GitHub API. We learn how to make HTTP requests using the fetch API and handle the resulting promises to retrieve and process data from GitHub.
A quick reminder:
API means Application Programming Interface. It's like a dedicated server that holds raw data.
A Promise is an object that supports two properties; State and Result.
The state could be any of Pending, Resolved, or Rejected
When the State is "Pending", Result is "undefined".
When the State is "Resolved", the Result is an object containing the data requested from the API.
When the State is Rejected, the Result is an error...
Key topics covered in this video:
Fetching data with fetch: Learn how to use the fetch API to make HTTP requests to the GitHub API.
Handling promises: Explore how to handle the promises returned by fetch to process the response data.
Parsing JSON data: Understand how to parse JSON data received from the GitHub API using the JSON.parse method.
Displaying data: Learn how to display the retrieved data on a web page using JavaScript.
Error handling: Discover how to handle potential errors that may occur during API requests and data processing.
By the end of this video, you'll have a solid understanding of how to use APIs and promises to fetch data from external sources and build dynamic web applications.
On this page of the site you can watch the video online API and Promises - Part 2 (Fetching Data from GitHub API) with a duration of hours minute second in good quality, which was uploaded by the user The Zuri Team 16 May 2021, share the link with friends and acquaintances, this video has already been watched 958 times on youtube and it was liked by 8 viewers. Enjoy your viewing!