/GitHubAPI

Page with Github api for getting user data

Primary LanguageCSS

This repo uses Github API to get the user info.

The basic fetch javascript functionality.

Function

fetch(`https://api.github.com/users/${user}`)
    .then((res) => {
        if(res.status === 200) {
            return res.json();
        }
        else if(res.status === 404) {
            return "No data found";
        }
    })
    .then((data) => {
        console.log(data);
    })
    .catch((e) => {
        console.log("No data found...");
    });