我很难弄清楚如何检索与特定课程(ID)相关的Google Drive文件夹。
我的理解是这个值可以作为teacherFolder值使用:
看这里:https://developers.google.com/classroom/reference/rest/v1/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)
},
返回的对象包含:
{
"id": string,
"title": string,
"alternateLink": string,
}
我正试图获得与谷歌课堂(通过课程ID)中的课程相关联的谷歌驱动器文件夹,以便我可以将资源上传到适当的文件夹。
请指给我正确的方向。
(我希望通过php实现这一点)
根据文档:
资源:课程
{
"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,
}
您可以查看CourseMaterialSet
属性,其中包含所有与课程相关的材料。
CourseMaterialSet
出现在课程"关于"页面上的一组资料。这些材料可能包括教学大纲、课程表或与整个课程相关的其他背景信息。
{
"title": string,
"materials": [
{
object(CourseMaterial)
}
],
}
CourseMaterial
附在课程上的材料,作为教材集的一部分。
{
// Union field material can be only one of the following:
"driveFile": {
object(DriveFile)
},
"youTubeVideo": {
object(YouTubeVideo)
},
"link": {
object(Link)
},
"form": {
object(Form)
},
// End of list of possible types for union field material.
}