让学生进入一个班级(30-40 名学生)每页需要 7-14 秒。
我什至尝试过“试试看!” 此 URL 上的功能,大约需要 7 秒 https://developers.google.com/classroom/reference/rest/v1/courses.students/list
- 排除了一些字段,但它没有帮助。
- 尝试将页面大小从 30 减小到 10,现在每次调用为 3 秒,但必须再调用 3 次。
更新:2016 年 7 月 19 日
新的 API 也一样慢。创建 CourseWork 需要 3-4 秒。知道为什么吗?
$.ajax({ 类型:“发布”, 内容类型:“应用程序/json;字符集=utf-8”, 网址:“https://classroom.googleapis.com/v1/courses/” + 课程编号 + "/courseWork?alt=json&key=" + apiKey, 数据:JSON.stringify({ 标题:任务名称, 材料: [ {'link': {'url': assignmentUrl }} ], 工作类型:'分配', 状态:'已发布', }), 发送前:函数(xhr){ xhr.setRequestHeader("授权", "承载" + token); }, 成功: ..., 错误: ... });