Google Classroom 外掛程式現已全面開放開發人員使用!詳情請參閱
外掛程式說明文件。
Material
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
附加至課程作業的教材。
建立附件時,系統不支援設定 form
、gem
或 notebook
欄位。
JSON 表示法 |
{
// Union field material can be only one of the following:
"driveFile": {
object (SharedDriveFile )
},
"youtubeVideo": {
object (YouTubeVideo )
},
"link": {
object (Link )
},
"form": {
object (Form )
},
"gem": {
object (GeminiGem )
},
"notebook": {
object (NotebookLmNotebook )
}
// End of list of possible types for union field material .
} |
欄位 |
聯集欄位 material 。Material 內容。material 只能是下列其中一項: |
driveFile |
object (SharedDriveFile )
Google 雲端硬碟檔案資料。
|
youtubeVideo |
object (YouTubeVideo )
YouTube 影片素材。
|
link |
object (Link )
連結素材。建立時,系統會盡可能將其升級為更合適的類型,並反映在回覆中。
|
form |
object (Form )
Google 表單教材。唯讀。
|
gem |
object (GeminiGem )
Gemini Gem 材質。唯讀。
|
notebook |
object (NotebookLmNotebook )
NotebookLM 筆記本內容。唯讀。
|
ShareMode
可能的共用選項。如未指定,預設值為 VIEW,且其他值只能在類型為 ASSIGNMENT 的課程作業物件中指定。
列舉 |
UNKNOWN_SHARE_MODE |
未指定共用模式,這個值絕不應傳回。 |
VIEW |
學生可以查看共用檔案。 |
EDIT |
學生可以編輯共用檔案。 |
STUDENT_COPY |
學生擁有共用檔案的個人副本。 |
GeminiGem
JSON 表示法 |
{
"id": string,
"title": string,
"url": string
} |
欄位 |
id |
string
Gem 資源 ID。
|
title |
string
Gem 的名稱。 唯讀。
|
url |
string
可用來存取 Gem 的網址。 唯讀。
|
NotebookLmNotebook
JSON 表示法 |
{
"id": string,
"title": string,
"url": string
} |
欄位 |
id |
string
筆記本資源 ID。
|
title |
string
筆記本標題。 唯讀。
|
url |
string
可用來存取 Notebook 的網址。 唯讀。
|
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-08-08 (世界標準時間)。
[null,null,["上次更新時間:2025-08-08 (世界標準時間)。"],[],[],null,["# Material\n\n- [JSON representation](#SCHEMA_REPRESENTATION)\n- [SharedDriveFile](#SharedDriveFile)\n - [JSON representation](#SharedDriveFile.SCHEMA_REPRESENTATION)\n- [ShareMode](#ShareMode)\n- [GeminiGem](#GeminiGem)\n - [JSON representation](#GeminiGem.SCHEMA_REPRESENTATION)\n- [NotebookLmNotebook](#NotebookLmNotebook)\n - [JSON representation](#NotebookLmNotebook.SCHEMA_REPRESENTATION)\n\nMaterial attached to course work.\n\nWhen creating attachments, setting the `form`, `gem`, or `notebook` field is not supported.\n\n| JSON representation |\n|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { // Union field `material` can be only one of the following: \"driveFile\": { object (/workspace/classroom/reference/rest/v1/Material#SharedDriveFile) }, \"youtubeVideo\": { object (/workspace/classroom/reference/rest/v1/YouTubeVideo) }, \"link\": { object (/workspace/classroom/reference/rest/v1/Link) }, \"form\": { object (/workspace/classroom/reference/rest/v1/Form) }, \"gem\": { object (/workspace/classroom/reference/rest/v1/Material#GeminiGem) }, \"notebook\": { object (/workspace/classroom/reference/rest/v1/Material#NotebookLmNotebook) } // End of list of possible types for union field `material`. } ``` |\n\n| Fields ||\n|----------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| Union field `material`. Material content. `material` can be only one of the following: ||\n| `driveFile` | `object (`[SharedDriveFile](/workspace/classroom/reference/rest/v1/Material#SharedDriveFile)`)` Google Drive file material. |\n| `youtubeVideo` | `object (`[YouTubeVideo](/workspace/classroom/reference/rest/v1/YouTubeVideo)`)` YouTube video material. |\n| `link` | `object (`[Link](/workspace/classroom/reference/rest/v1/Link)`)` Link material. On creation, this is upgraded to a more appropriate type if possible, and this is reflected in the response. |\n| `form` | `object (`[Form](/workspace/classroom/reference/rest/v1/Form)`)` Google Forms material. Read-only. |\n| `gem` | `object (`[GeminiGem](/workspace/classroom/reference/rest/v1/Material#GeminiGem)`)` Gemini Gem material. Read-only. |\n| `notebook` | `object (`[NotebookLmNotebook](/workspace/classroom/reference/rest/v1/Material#NotebookLmNotebook)`)` NotebookLM Notebook material. Read-only. |\n\nSharedDriveFile\n---------------\n\nDrive file that is used as material for course work.\n\n| JSON representation |\n|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"driveFile\": { object (/workspace/classroom/reference/rest/v1/DriveFile) }, \"shareMode\": enum (/workspace/classroom/reference/rest/v1/Material#ShareMode) } ``` |\n\n| Fields ||\n|-------------|--------------------------------------------------------------------------------------------------------------------------------------|\n| `driveFile` | `object (`[DriveFile](/workspace/classroom/reference/rest/v1/DriveFile)`)` Drive file details. |\n| `shareMode` | `enum (`[ShareMode](/workspace/classroom/reference/rest/v1/Material#ShareMode)`)` Mechanism by which students access the Drive item. |\n\nShareMode\n---------\n\nPossible sharing options. Defaults to VIEW if left unspecified, and other values may only be specified within a course work object of type ASSIGNMENT.\n\n| Enums ||\n|----------------------|-----------------------------------------------------------|\n| `UNKNOWN_SHARE_MODE` | No sharing mode specified. This should never be returned. |\n| `VIEW` | Students can view the shared file. |\n| `EDIT` | Students can edit the shared file. |\n| `STUDENT_COPY` | Students have a personal copy of the shared file. |\n\nGeminiGem\n---------\n\nGemini Gem link.\n\n| JSON representation |\n|----------------------------------------------------------|\n| ``` { \"id\": string, \"title\": string, \"url\": string } ``` |\n\n| Fields ||\n|---------|-------------------------------------------------------------|\n| `id` | `string` Gems resource id. |\n| `title` | `string` Title of the Gem. Read-only. |\n| `url` | `string` URL that can be used to access the Gem. Read-only. |\n\nNotebookLmNotebook\n------------------\n\nNotebookLM Notebook link.\n\n| JSON representation |\n|----------------------------------------------------------|\n| ``` { \"id\": string, \"title\": string, \"url\": string } ``` |\n\n| Fields ||\n|---------|------------------------------------------------------------------|\n| `id` | `string` Notebook resource id. |\n| `title` | `string` Title of the Notebook. Read-only. |\n| `url` | `string` URL that can be used to access the Notebook. Read-only. |"]]