1

I am trying to use Google App Scripts to access the Khan Academy server and count the number of skills required to master a given topic. For instance, I would like to be able to retrieve the number of skills required to master Algebra 1. How can I do this using the 'topictree'? I have successfully accessed the Khan Academy servers and have no problem printing out the contents of the topictree - I just need to know where information about required skills is stored. Thanks!

function listExercises() {
  var service = getKhanAcademyService();
  if (service.hasAccess()) {

    var response = service.fetch('https://www.khanacademy.org/api/v1/topictree');
    Logger.log(response);

    //----Here I would like to navigate to a specific topic (like Algebra 1) 
    in the topic tree and retrieve how many skills are required to master it-- //

  } else {
    var authorizationUrl = service.authorize();
    Logger.log('Please visit the following URL and then re-run the script: ' + authorizationUrl);
  }
}
Sagar V
  • 12,158
  • 7
  • 41
  • 68

0 Answers0