Chapter 8: add first recipe samples
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
const fetch = require("node-fetch");
|
||||
|
||||
module.exports.getGitHubUser = (username) => {
|
||||
return fetch("https://api.github.com/users/" + username)
|
||||
.then((res) => res.json())
|
||||
.then((json) => {
|
||||
return json;
|
||||
});
|
||||
};
|
||||
Reference in New Issue
Block a user