google-classroom - 通过 API Google Classroom 获取课程的“主题”价值
问题描述
如何在 API 中获取或更新课程的“主题”值?我在文档中没有找到任何相关信息
https://developers.google.com/classroom/reference/rest/v1/courses/get?authuser=1
解决方案
编辑
正如 R1KO 指出的那样,当您填写课程时,会有一个单独的主题字段。
courses
但是,从下面对象的完整响应中可以看出,API 中没有这样的字段。
我已经调用了更多端点以查看它是否被埋在其他地方,但我找不到它。然而,查看问题跟踪器,发现了这个功能请求:
为课程添加主题
因此,此时您似乎可以做的最好的事情就是点击该功能中的 ☆ 按钮,让 Google 知道您需要此功能。
“主题”是 API 中的“名称”
这是整个courses
对象:
{
"id": string,
"name": string,
"section": string,
"descriptionHeading": string,
"description": string,
"room": string,
"ownerId": string,
"creationTime": string,
"updateTime": string,
"enrollmentCode": string,
"courseState": enum (CourseState),
"alternateLink": string,
"teacherGroupEmail": string,
"courseGroupEmail": string,
"teacherFolder": {
object (DriveFolder)
},
"courseMaterialSets": [
{
object (CourseMaterialSet)
}
],
"guardiansEnabled": boolean,
"calendarId": string
}
字段说明name
如下:
课程名称。例如,“10 年级生物学”。名称是必需的。它必须介于 1 到 750 个字符之间,并且是有效的 UTF-8 字符串。
https://developers.google.com/classroom/reference/rest/v1/courses
您可以通过以下GET
请求获得此信息:
https://developers.google.com/classroom/reference/rest/v1/courses/get
要获取上面列出的所有字段,请确保包含*
为 fields 参数。
用UPDATE
or更新PATCH
:
https://developers.google.com/classroom/reference/rest/v1/courses/update https://developers.google.com/classroom/reference/rest/v1/courses/patch
推荐阅读
- php - 使用ajax发送双引号时出错
- javascript - 如何通过JS重定向到另一个页面(发送参数)
- c# - 无法转换类型列表。
到字符串错误 - python - 我可以得到两种模式(统计)吗?
- javascript - Nightwatch - 无法单击 Safari 中的元素(Catalina)
- python - 使用 Gertboard 设置 Raspberry Pi 以使用 Arduino 引脚
- jquery - 使用 JQueryUI 自动完成更新多个字段
- kotlin - 范围是否在后台默默地处理异常/失败?
- java - JAVA aws s3client:抛出异常:java.lang.BootstrapMethodError:引导方法初始化异常
- python - 为什么 Pandas 在选择列时有时似乎会更改字符串编码?