How to convert enrollment code to course id?

半世苍凉 提交于 2019-12-13 04:25:54

问题


Is there a way to get a course identifier (id, course object itself .etc) from an enrollment code with an HTTP request?

I don't see any way to do so in the classroom REST API documentation.

Similar to scripting a join screen, how do I convert an enrollment code obtained from a GoogleTeacher to a classroom id which I can then use with an API call like GET https://classroom.googleapis.com/v1/courses/id (Classroom.Courses.get())?


回答1:


there might be no direct way to query courses by the enrollmentCode - but one can list all courses to get their courseIds and then use get by courseId, in order to compare the enrollmentCode of that course and return the room, when the enrollmentCode matches.

see the API documentation.



来源:https://stackoverflow.com/questions/53093883/how-to-convert-enrollment-code-to-course-id

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!