Method: users.sections.position

變更區段的排序順序。詳情請參閱「在 Google Chat 中建立及管理區段」。

需要使用授權範圍進行使用者驗證

  • https://www.googleapis.com/auth/chat.users.sections

HTTP 要求

POST https://chat.googleapis.com/v1/{name=users/*/sections/*}:position

這個網址使用 gRPC 轉碼語法。

路徑參數

參數
name

string

必填。要放置的章節資源名稱。

格式:users/{user}/sections/{section}

要求主體

要求主體會包含結構如下的資料:

JSON 表示法
{

  // Union field position can be only one of the following:
  "sortOrder": integer,
  "relativePosition": enum (Position)
  // End of list of possible types for union field position.
}
欄位
聯集欄位 position。必填。新區段的位置。position 只能是下列其中一項:
sortOrder

integer

(選用步驟) 區段在區段清單中的絕對位置。位置必須大於 0。如果位置大於區段數量,區段會附加至清單結尾。這項作業會在指定位置插入章節,並將該位置的原始章節和下方的章節移至下一個位置。

relativePosition

enum (Position)

(選用步驟) 該區塊在區塊清單中的相對位置。

回應主體

用於定位區塊的回應訊息。

如果成功,回應主體會含有以下結構的資料:

JSON 表示法
{
  "section": {
    object (Section)
  }
}
欄位
section

object (Section)

更新後的區段。

授權範圍

需要下列 OAuth 範圍:

  • https://www.googleapis.com/auth/chat.users.sections

詳情請參閱授權指南

位置

區段的位置。

列舉
POSITION_UNSPECIFIED 未指定位置。
START 章節清單的開頭。
END 章節清單結尾。