function init() {
  inquirer.prompt(questions).then(function (answers) {
    console.log("collected user info", answers);
    const queryUrl = `https://api.github.com/users/${answers.username}?access_token=${apiKey}`;
    // console.log("full URL", queryUrl);
    axios.get(queryUrl).then(function (response) {
      // console.log("get API response", response.data);
      writeToFile(answers, response);
    });
  });
}
// COLLECT USER INFO, CALL API, CREATE MARKDOWN FILE ================================================
COLLECT USER INFO, CALL API, CREATE MARKDOWN FILE
COLLECT USER INFO CALL API CREATE MARKDOWN FILE
function init() {
  inquirer.prompt(questions).then(function (answers) {
    console.log("collected user info", answers);
    const queryUrl = `https://api.github.com/users/${answers.username}?access_token=${apiKey}`;
    axios.get(queryUrl).then(function (response) {
      writeToFile(answers, response);
    });
  });
}
function init ( ) { inquirer . prompt ( questions ) . then ( function ( answers ) { console . log ( "collected user info" , answers ) ; const queryUrl = ` ${ answers . username } ${ apiKey } ` ; axios . get ( queryUrl ) . then ( function ( response ) { writeToFile ( answers , response ) ; } ) ; } ) ; }
COLLECT USER INFO, CALL API, CREATE MARKDOWN FILE
COLLECT USER INFO CALL API CREATE MARKDOWN FILE
// console.log("full URL", queryUrl); // console.log("get API response", response.data);