...

/

Creating an App Using Github API

Creating an App Using Github API

Implement what you have learned about APIs.

Introduction

We’ll use the public GitHub API in this project. Without going into too much detail about the UI elements in this lesson, we’ll focus on fetching the data from the API and displaying it on the page.

API endpoint

Endpoints are URLs we use to access our API. The endpoint we’ll be using is: https://api.github.com/users/{username}

{
  "12bb71342c6255bbf50437ec8f4441c083f47cdb74bd89160c15e4f43e52a1cb": true,
  "40b842e832070c58deac6aa9e08fa459302ee3f9da492c7e77d93d2fbf4a56fd": true
}
GitHub API example

Note: Once the server starts, click the URL next to “Your app can be found at:” to view the output.

States

The following states are used in this project:

  • username: The username of the user we are fetching data about.
  • details: The data of the user to be displayed.
...