Created
January 8, 2019 08:07
-
-
Save implicit-invocation/0c38c2ec81b47d45835ccccd7cd52860 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title></title> | |
</head> | |
<body> | |
<input type="text" name="username" /> | |
<ul id="repo-list"></ul> | |
<script type="text/javascript" src="repo-search-app.js"></script> | |
</body> | |
</html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function getRepoList(username) { | |
fetch(`https://api.github.com/users/${username}/repos`) | |
.then(res => res.json()) | |
.then(repos => alert(repos.length)); | |
} | |
getRepoList('implicit-invocation'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment