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
ตำแหน่งที่เป็นไปได้ในอัลบั้ม
Enum |
POSITION_TYPE_UNSPECIFIED |
ค่าเริ่มต้นหากไม่ได้ตั้งค่า enum นี้ |
FIRST_IN_ALBUM |
ช่วงต้นของอัลบั้ม |
LAST_IN_ALBUM |
ท้ายอัลบั้ม |
AFTER_MEDIA_ITEM |
หลังรายการสื่อ |
AFTER_ENRICHMENT_ITEM |
หลังรายการปรับปรุง |
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-07-25 UTC
[null,null,["อัปเดตล่าสุด 2025-07-25 UTC"],[[["\u003cp\u003e\u003ccode\u003eAlbumPosition\u003c/code\u003e defines the position of media or enrichment items within a Google Photos album.\u003c/p\u003e\n"],["\u003cp\u003eIt offers five position types: \u003ccode\u003ePOSITION_TYPE_UNSPECIFIED\u003c/code\u003e, \u003ccode\u003eFIRST_IN_ALBUM\u003c/code\u003e, \u003ccode\u003eLAST_IN_ALBUM\u003c/code\u003e, \u003ccode\u003eAFTER_MEDIA_ITEM\u003c/code\u003e, and \u003ccode\u003eAFTER_ENRICHMENT_ITEM\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eFor positions relative to other items (\u003ccode\u003eAFTER_MEDIA_ITEM\u003c/code\u003e, \u003ccode\u003eAFTER_ENRICHMENT_ITEM\u003c/code\u003e), you must specify the ID of the relative media or enrichment item.\u003c/p\u003e\n"],["\u003cp\u003eThe JSON representation includes the \u003ccode\u003eposition\u003c/code\u003e type and, if necessary, the ID of the relative item (\u003ccode\u003erelativeMediaItemId\u003c/code\u003e or \u003ccode\u003erelativeEnrichmentItemId\u003c/code\u003e).\u003c/p\u003e\n"]]],["The content defines how to specify a position within an album using a JSON structure. It uses a `position` field with an enumerated type (`PositionType`) that can be `FIRST_IN_ALBUM`, `LAST_IN_ALBUM`, `AFTER_MEDIA_ITEM`, or `AFTER_ENRICHMENT_ITEM`. If positioning after an item, either `relativeMediaItemId` or `relativeEnrichmentItemId` must be specified in the `relative_item` union field to identify the referenced media or enrichment item.\n"],null,["# AlbumPosition\n\n- [JSON representation](#SCHEMA_REPRESENTATION)\n- [PositionType](#PositionType)\n\nSpecifies a position in an album.\n\n| JSON representation |\n|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"position\": enum (/photos/library/reference/rest/v1/AlbumPosition#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`. } ``` |\n\n| Fields ||\n|----------------------------|-------------------------------------------------------------------------------------------------------------------------------------------|\n| `position` | `enum (`[PositionType](/photos/library/reference/rest/v1/AlbumPosition#PositionType)`)` Type of position, for a media or enrichment item. |\n| Union field `relative_item`. The item to which the position is relative to. This must be set only if using position type `AFTER_MEDIA_ITEM` or `AFTER_ENRICHMENT_ITEM`. `relative_item` can be only one of the following: ||\n| `relativeMediaItemId` | `string` The media item to which the position is relative to. Only used when position type is AFTER_MEDIA_ITEM. |\n| `relativeEnrichmentItemId` | `string` The enrichment item to which the position is relative to. Only used when position type is AFTER_ENRICHMENT_ITEM. |\n\nPositionType\n------------\n\nPossible positions in an album.\n\n| Enums ||\n|-----------------------------|---------------------------------------|\n| `POSITION_TYPE_UNSPECIFIED` | Default value if this enum isn't set. |\n| `FIRST_IN_ALBUM` | At the beginning of the album. |\n| `LAST_IN_ALBUM` | At the end of the album. |\n| `AFTER_MEDIA_ITEM` | After a media item. |\n| `AFTER_ENRICHMENT_ITEM` | After an enrichment item. |"]]