您目前查看的是 Google Photos Library API 的舊版說明文件。
AlbumPosition
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
JSON 表示法 |
{
"position": enum (PositionType ),
// Union field relative_item can be only one of the following:
"relativeMediaItemId": string,
"relativeEnrichmentItemId": string
// End of list of possible types for union field relative_item .
} |
欄位 |
position |
enum (PositionType )
媒體或擴充項目的位置類型。
|
聯集欄位 relative_item 。與位置相關的項目。只有在使用位置類型 AFTER_MEDIA_ITEM 或 AFTER_ENRICHMENT_ITEM 時,才需要設定這個屬性。relative_item 只能採用下列其中一種設定: |
relativeMediaItemId |
string
與位置相關的媒體項目。僅適用於位置類型為 AFTER_MEDIA_ITEM 的情況。
|
relativeEnrichmentItemId |
string
與位置相關的擴充項目。只有在位置類型為 AFTER_ENRICHMENT_ITEM 時才能使用。
|
PositionType
列舉 |
POSITION_TYPE_UNSPECIFIED |
未設定這個列舉時的預設值。 |
FIRST_IN_ALBUM |
在相簿開頭。 |
LAST_IN_ALBUM |
專輯結束時。 |
AFTER_MEDIA_ITEM |
在媒體項目後方。 |
AFTER_ENRICHMENT_ITEM |
在擴充項目之後。 |
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-07-25 (世界標準時間)。
[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["缺少我需要的資訊","missingTheInformationINeed","thumb-down"],["過於複雜/步驟過多","tooComplicatedTooManySteps","thumb-down"],["過時","outOfDate","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["示例/程式碼問題","samplesCodeIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2025-07-25 (世界標準時間)。"],[[["\u003cp\u003e\u003ccode\u003eAlbumPosition\u003c/code\u003e defines the position of media or enrichment items within an album using the \u003ccode\u003ePositionType\u003c/code\u003e enum.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003ePositionType\u003c/code\u003e includes options for positioning items at the beginning, end, or relative to other media or enrichment items within the album.\u003c/p\u003e\n"],["\u003cp\u003eWhen specifying positions relative to other items, \u003ccode\u003erelativeMediaItemId\u003c/code\u003e or \u003ccode\u003erelativeEnrichmentItemId\u003c/code\u003e must be used depending on the item type.\u003c/p\u003e\n"]]],["The core content describes how to specify a position within an album using JSON. A position is defined by a `position` type, which can be `FIRST_IN_ALBUM`, `LAST_IN_ALBUM`, `AFTER_MEDIA_ITEM`, or `AFTER_ENRICHMENT_ITEM`. If the position is after an existing item, a `relative_item` union field, containing either `relativeMediaItemId` or `relativeEnrichmentItemId`, specifies that item's ID. `POSITION_TYPE_UNSPECIFIED` is used if position type is not specified.\n"],null,[]]