REST Resource: courses.posts.addOnAttachments

資源:AddOnAttachment

訊息的外掛程式附件。

JSON 表示法
{
  "courseId": string,
  "postId": string,
  "itemId": string,
  "id": string,
  "title": string,
  "teacherViewUri": {
    object (EmbedUri)
  },
  "studentViewUri": {
    object (EmbedUri)
  },
  "studentWorkReviewUri": {
    object (EmbedUri)
  },
  "dueDate": {
    object (Date)
  },
  "dueTime": {
    object (TimeOfDay)
  },
  "maxPoints": number,
  "copyHistory": [
    {
      object (CopyHistory)
    }
  ]
}
欄位
courseId

string

無法變更。課程的 ID。

postId
(deprecated)

string

無法變更。已淘汰,請改用 itemId。

itemId

string

無法變更。附加附件的公告、CourseWork 或 pathWorkMaterial 的 ID。每個課程的不重複價值。

id

string

無法變更。Classroom 為這個附件指派的 ID,每則訊息均有專屬的 ID。

title

string

必要欄位。這個附件的標題。標題長度必須介於 1 至 1,000 個字元之間。

teacherViewUri

object (EmbedUri)

必要欄位。這個 URI 會顯示老師所檢視附件的檢視畫面。URI 會在已設定 courseIdpostIdattachmentId 查詢參數的 iframe 中開啟。

studentViewUri

object (EmbedUri)

必要欄位。這個 URI 代表學生查看附件。URI 會在已設定 courseIdpostIdattachmentId 查詢參數的 iframe 中開啟。

studentWorkReviewUri

object (EmbedUri)

可供老師查看附件學生作業的 URI (如適用)。URI 會在已設定 courseIdpostIdattachmentIdsubmissionId 查詢參數的 iframe 中開啟。這是學生查看附件時 [google.classroom.AddOns.GetAddOnContext][announcements.getAddOnContext] 傳回的 submissionId。如果省略或移除 URI,也會捨棄 maxPoints

dueDate

object (Date)

這個附件的有效日期 (以世界標準時間為準)。如果已指定 dueTime,則必須指定這個值。

dueTime

object (TimeOfDay)

這個附件的使用時間 (以世界標準時間為準)。如果已指定 dueDate,則必須指定這個值。

maxPoints

number

這個附件的總成績。必須先設定 studentWorkReviewUri 才能設定。請設為非零的值,表示附件支援成績回傳。設定後,這個值必須是非負整數。如果設為 0,這個附件將不支援回傳成績。

copyHistory[]

object (CopyHistory)

僅供輸出。這個附件先前副本的附件 ID。

如果附件是先前所複製的父項文章而複製而來,這裡會列出其先前副本的附件 ID,依副本的時間順序遞增。

方法

create

在訊息下方建立外掛程式附件。

delete

刪除外掛程式附件。

get

傳回外掛程式附件。

list

傳回訊息下方外掛程式建立的所有附件。

patch

更新外掛程式附件。