1

我正在尝试使用 Google App Scripts 访问可汗学院服务器并计算掌握给定主题所需的技能数量。例如,我希望能够检索掌握代数 1 所需的技能数量。如何使用“主题树”来做到这一点?我已经成功访问​​了可汗学院的服务器,并且打印出主题树的内容没有问题——我只需要知道有关所需技能的信息存储在哪里。谢谢!

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);
  }
}
4

0 回答 0