Google Classroom 外掛程式現已全面開放開發人員使用!詳情請參閱
外掛程式說明文件。
管理課程邀請
Classroom 中的 Invitation
資源代表邀請,邀請使用者以特定課程角色 (學生、老師或擁有者) 加入課程。
每個 Invitation
資源都包含下列欄位:
id
:邀請函的 Classroom 指派 ID。
userId
:已受邀加入課程的使用者 ID。
courseId
:使用者受邀加入的課程。
role
:受邀使用者在課程中的課程角色。
建立邀請
您可以使用 invitations.create()
方法,邀請使用者加入課程並擔任特定角色。在要求主體中加入 Invitation
資源,並指定 courseId
、userId
和 role
。
擷取邀請
呼叫 invitations.get()
方法,並指定邀請函的 id
,即可擷取特定邀請函。
接受邀請
接受邀請後,系統會刪除邀請,並將受邀使用者加入課程,並指派邀請中指定的角色。呼叫 invitations.accept()
方法並指定邀請的 id
,即可接受邀請。
刪除邀請
如要更新邀請,唯一的方法是刪除邀請,然後建立新的邀請。如要刪除邀請,請呼叫 invitations.delete()
方法,並指定 id
。
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-01-14 (世界標準時間)。
[null,null,["上次更新時間:2025-01-14 (世界標準時間)。"],[[["An Invitation resource in Classroom allows users to join a course with a specific role, containing fields like `id`, `userId`, `courseId`, and `role`."],["You can create, retrieve, accept, and delete invitations using the Classroom API's `invitations` methods, specifying necessary parameters like `courseId`, `userId`, `role`, and `id`."],["Accepting an invitation adds the user to the course with the specified role and deletes the invitation, while deleting an invitation requires using the `invitations.delete()` method."],["Updating an invitation involves deleting the existing one and creating a new one with the desired changes."]]],[]]