คุณกำลังดูเอกสารประกอบเดิมสำหรับ Google Photos Library API
เพิ่มคุณค่า
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
การปรับปรุงช่วยให้แอปพลิเคชันของคุณสามารถควบคุมโครงสร้างและการนำเสนอ
รูปภาพในอัลบั้มใน Google Photos ทำให้คุณสามารถนำเสนอผู้ใช้
พร้อมบริบทเพิ่มเติมผ่านคำอธิบายประกอบแบบข้อความหรือตำแหน่ง และคำสั่งซื้อ/กลุ่ม
ที่บอกเล่าเรื่องราวร่วมกัน
ขอบเขตการให้สิทธิ์ที่จำเป็น
หากต้องการเพิ่มการปรับแต่ง ให้ระบุขอบเขตต่อไปนี้อย่างน้อย 1 รายการ
photoslibrary.appendonly
photoslibrary.library
photoslibrary.sharing
สำหรับแต่ละขอบเขต การเรียก enrichAlbum
จะจำกัดไว้เฉพาะอัลบั้มที่สร้างเท่านั้น
จากแอป
เมื่อใช้ขอบเขต .sharing
enrichAlbum
จะจำกัดเฉพาะสถานการณ์
ที่นักพัฒนาซอฟต์แวร์ดำเนินการในนามของเจ้าของอัลบั้มที่แชร์
ประเภทการเสริมอาหาร
Google Photos รองรับส่วนเสริม 3 ประเภทในอัลบั้ม ได้แก่ ข้อความ
สถานที่ตั้ง และแผนที่
การตกแต่งข้อความ
การปรับแต่งข้อความคือสตริงข้อความธรรมดาที่สามารถแทรกเพื่อเพิ่มคำอธิบายประกอบ
การเสริมสถานที่
การปรับปรุงสถานที่เป็นเครื่องหมายและชื่อของสถานที่ที่สามารถแทรกได้
เพื่อใส่คำอธิบายประกอบของสถานที่
การปรับปรุงแผนที่
ความสมบูรณ์ให้กับแผนที่ คือแผนที่ที่มีต้นทางและปลายทางที่ระบุไว้ ซึ่งสามารถ
แทรกในอัลบั้มแล้ว
ตำแหน่ง
หากต้องการแทรกรายการสื่อและการปรับปรุงอัลบั้ม ให้ระบุตำแหน่งของอัลบั้ม
ตำแหน่งเป็นรายการที่ไม่บังคับสำหรับรายการสื่อ แต่ต้องระบุสำหรับอัลบั้ม
คุณค่ามากขึ้น
ระบุตำแหน่งได้ก็ต่อเมื่อ
การสร้างรายการสื่อ
หรือการเพิ่มคุณค่า คุณไม่สามารถจัดระเบียบใหม่ในรายการสื่อที่มีอยู่ในอัลบั้มได้ ดังนั้น
เป็นสิ่งสำคัญในการกำหนดตำแหน่งของรายการเมื่อมีการเพิ่มรายการ
เริ่มต้นอัลบั้ม
สามารถเพิ่มรายการสื่อ/เนื้อหาเสริมที่จุดเริ่มต้นของอัลบั้มเป็น "สัมบูรณ์"
ของคุณ
สิ้นสุดอัลบั้ม
สามารถเพิ่มรายการสื่อ/เนื้อหาเสริมที่ท้ายอัลบั้มได้แบบสัมบูรณ์
ของคุณ
เพิ่มสื่อ/รายการปรับปรุงได้ซึ่งสัมพันธ์กับรายการสื่อที่เริ่มต้นด้วย
ตำแหน่งที่มีในอัลบั้ม
เกี่ยวข้องกับรายการปรับปรุง
เพิ่มสื่อ/รายการปรับปรุงได้ซึ่งสัมพันธ์กับจุดเริ่มต้นรายการเสริม
หลังจากตำแหน่งในอัลบั้ม
การเพิ่มการตกแต่งลงในอัลบั้ม
ระบบจะเพิ่มข้อความเสริมทีละอย่างและต้องเพิ่มลงในตำแหน่งในอัลบั้ม
หากต้องการเพิ่มคุณค่าให้กับอัลบั้ม ให้โทร
albums.addEnrichment
หากคำขอประสบความสำเร็จ ระบบจะแสดง id
ของรายการเสริม ซึ่ง
สามารถใช้ในการวางตำแหน่งรายการสื่อหรือองค์ประกอบเสริมอื่นๆ
REST
คำขอ POST มีดังนี้
POST https://photoslibrary.googleapis.com/v1/albums/album-id:addEnrichment
Content-type: application/json
Authorization: Bearer oauth2-token
request-body
เนื้อหาของคำขอประกอบด้วยรายการเสริมและตำแหน่ง
{
"newEnrichmentItem": {
enrichment-to-be-added
},
"albumPosition": {
position-of-enrichment
}
ตัวอย่างคำตอบมีดังนี้
{
"enrichmentItem": {
"id": "enrichment-item-id",
}
}
Java
try {
// Create the enrichment using the NewEnrichmentItemFactory helper
NewEnrichmentItem newEnrichmentItem = NewEnrichmentItemFactory.createTextEnrichment("");
// Set the position of the enrichment within the album
AlbumPosition albumPosition = AlbumPositionFactory.createFirstInAlbum();
// To add an enrichment, specify the album, the enrichment item,
// and the position in the album where the enrichment is to be added
AddEnrichmentToAlbumResponse response = photosLibraryClient
.addEnrichmentToAlbum(albumId, newEnrichmentItem, albumPosition);
// The response contains an EnrichmentItem
// whose ID can be used to position media items or other enrichments
EnrichmentItem enrichmentItem = response.getEnrichmentItem();
String itemId = enrichmentItem.getId();
} catch (ApiException e) {
// Handle error
}
PHP
// Create the enrichment item using the PhotosLibraryResourceFactory helper
$newEnrichmentItem = PhotosLibraryResourceFactory::newEnrichmentItemWithText("");
// ...
// Set the position of the enrichment within the album
$position = new AlbumPosition();
// ...
try {
// To add an enrichment, specify the album, the enrichment item,
// and the position in the album where the enrichment is to be added
$response = $photosLibraryClient->addEnrichmentToAlbum($albumId, $newEnrichmentItem, $position);
// The response contains an EnrichmentItem
// whose ID can be used to position media items or other enrichments
$enrichmentItem = $response->getEnrichmentItem();
$itemId = $enrichmentItem->getId();
} catch (\Google\ApiCore\ApiException $e) {
// Handle error
}
การปรับปรุงที่รองรับ
การตกแต่งข้อความ
การปรับแต่งข้อความมีสตริงข้อความเดียว (ไม่เกิน 1,000 อักขระ) ตาม
ที่แสดงในตัวอย่างต่อไปนี้
REST
{
"text": "Text to be shown"
}
Java
// Use the NewEnrichmentItemFactory helper to create a text enrichment item
NewEnrichmentItem newEnrichmentItem =
NewEnrichmentItemFactory.createTextEnrichment("text to be shown");
PHP
$newEnrichmentItem = PhotosLibraryResourceFactory::newEnrichmentItemWithText("text to be shown");
การเสริมสถานที่
การเสริมสถานที่ประกอบด้วยชื่อสถานที่ที่กำหนดเอง รวมถึงละติจูดและ
ตำแหน่งลองจิจูด locationName
จำกัดอักขระที่ 500 ตัว
REST
{
"location": {
"locationName": "Australia",
"latlng": {
"latitude": "-21.197",
"longitude": "95.821"
}
}
}
Java
// Use the NewEnrichmentItemFactory helper to create a location enrichment
// with the name, latitude, and longitude of the location
NewEnrichmentItem newEnrichmentItem =
NewEnrichmentItemFactory.createLocationEnrichment("Australia", -21.197, 95.821);
PHP
// Create a new location object and set the name, latitude, and longitude of the location
$newLocation = new Location();
$newLocation->setLocationName("Australia");
$newLocation->setLatlng((new LatLng())->setLatitude(-21.197)->setLongitude(95.821));
$newEnrichmentItem = PhotosLibraryResourceFactory::newEnrichmentItemWithLocation($newLocation);
การปรับปรุงแผนที่
การปรับปรุงแผนที่แสดงสถานที่ 2 แห่ง โดยแต่ละสถานที่ประกอบไปด้วยชื่อและละติจูด
และลองจิจูด เช่นเดียวกับการปรับปรุงสถานที่ตั้ง locationName
ภายใน
ต้นทางและ destination
มีอักขระได้ไม่เกิน 500 ตัว
REST
{
"origin": {
"locationName": "Australia",
"latlng": {
"latitude": "-21.197",
"longitude": "95.821"
}
},
"destination": {
"locationName": "San Francisco",
"latlng": {
"latitude": "37.757",
"longitude": "122.507"
}
}
}
Java
// Use the NewEnrichmentItemFactory helper to create a map enrichment item for
// an origin and a destination location
NewEnrichmentItem newEnrichmentItem = NewEnrichmentItemFactory.createMapEnrichment(
"Australia", -21.197, 95.821, // origin
"San Francisco", 37.757, 122.507 // destination
);
PHP
// Create two new location objects to create a map enrichment item
// for an origin and a destination location
$locationAustralia = new Location();
$locationAustralia->setLocationName("Australia");
$locationAustralia->setLatlng((new LatLng())->setLatitude(-21.197)->setLongitude(95.821));
$locationSanFrancisco = new Location();
$locationSanFrancisco->setLocationName("San Francisco");
$locationSanFrancisco->setLatlng((new LatLng())->setLatitude(37.757)->setLongitude(122.507));
$newEnrichmentItem =
PhotosLibraryResourceFactory::newEnrichmentItemWithMap($locationAustralia, $locationSanFrancisco);
จุดยืนที่รองรับ
เริ่มต้นอัลบั้ม
ตำแหน่ง FIRST_IN_ALBUM
หมายถึงจุดเริ่มต้นของอัลบั้ม พบรายการแล้ว
จะแสดงต่อผู้ใช้เป็นลำดับแรก
REST
{
"position": "FIRST_IN_ALBUM",
}
Java
AlbumPosition albumPosition = AlbumPositionFactory.createFirstInAlbum();
PHP
$albumPosition = new AlbumPosition();
$albumPosition->setPosition(PositionType::FIRST_IN_ALBUM);
สิ้นสุดอัลบั้ม
ตำแหน่ง LAST_IN_ALBUM
หมายถึงจุดสิ้นสุดของอัลบั้ม รายการที่ตั้งอยู่ที่นี่
แสดงต่อผู้ใช้เป็นลำดับสุดท้าย
REST
{
"position": "LAST_IN_ALBUM",
}
Java
AlbumPosition albumPosition = AlbumPositionFactory.createLastInAlbum();
PHP
$albumPosition = new AlbumPosition();
$albumPosition->setPosition(PositionType::LAST_IN_ALBUM);
การระบุตำแหน่ง relativeMediaItem
หมายถึงตำแหน่งที่สัมพันธ์กับ
รายการสื่อ ระบบจะเพิ่มรายการไว้หลังรายการสื่อที่ระบุ
REST
{
"position": "after-media-item",
"relativeMediaItemId": "media-item-id"
}
Java
AlbumPosition albumPosition = AlbumPositionFactory.createAfterMediaItem(mediaItemId);
PHP
$albumPosition = PhotosLibraryResourceFactory::albumPositionAfterMediaItem($mediaItemId);
เกี่ยวข้องกับรายการปรับปรุง
การระบุ relativeEnrichmentItemId
หมายถึงตำแหน่งที่สัมพันธ์กับ
รายการปรับปรุง ระบบจะเพิ่มไอเทมไว้หลังรายการเสริมที่ระบุ
REST
{
"position": "after-enrichment-item",
"relativeEnrichmentItemId": "enrichment-item-id"
}
Java
AlbumPosition albumPosition = AlbumPositionFactory.createAfterEnrichmentItem(enrichmentItemId);
PHP
$albumPosition = PhotosLibraryResourceFactory::albumPositionAfterEnrichmentItem($enrichmentItemId);
การแก้ไขเพิ่มเติม
ปัจจุบันยังไม่มีวิธีแก้ไขการปรับแต่ง แต่เมื่อเสริม
ได้รับการสร้างและเพิ่มไปยังอัลบั้ม โดยผู้ใช้สามารถแก้ไข
ผ่านแอป Google Photos
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-09-04 UTC
[[["เข้าใจง่าย","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-09-04 UTC"],[[["\u003cp\u003eEnrichments give your application control over the structure and presentation of photos within Google Photos albums by adding context through annotations and ordering.\u003c/p\u003e\n"],["\u003cp\u003eGoogle Photos supports three types of enrichments: text, locations (markers with place names), and maps (showing an origin and destination).\u003c/p\u003e\n"],["\u003cp\u003eWhen adding enrichments, you must specify their position in the album, which can be at the start, end, or relative to an existing media or enrichment item.\u003c/p\u003e\n"],["\u003cp\u003eEnrichments are added individually using the \u003ccode\u003ealbums.addEnrichment\u003c/code\u003e call, requiring specific authorization scopes.\u003c/p\u003e\n"],["\u003cp\u003eAlthough enrichments can't be modified programmatically, users can edit them directly through the Google Photos app.\u003c/p\u003e\n"]]],["Enrichments allow control over photo presentation in Google Photos albums by adding context and organizing images. Three enrichment types are supported: text, location, and map. Adding enrichments requires specific authorization scopes and is restricted to albums the app created. Enrichments are added one at a time via `albums.addEnrichment`, specifying the enrichment item and its position within the album. Positions can be at the start or end of the album, or relative to media or other enrichment items. The enrichment item ID returned can be used to position items.\n"],null,["Enrichments let your application control the structure and presentation of\nphotos within an album in Google Photos. They allow you to present the user\nwith additional context through text or location annotations and order/group\nimages that tell a story together.\n\nRequired authorization scope\n\nTo add enrichments, at least one of the following scopes is required:\n\n- `photoslibrary.appendonly`\n- `photoslibrary.library`\n- `photoslibrary.sharing`\n\nFor each scope, the `enrichAlbum` call is restricted to only the albums created\nby the app.\n\nWhen using the `.sharing` scope, `enrichAlbum` is restricted to circumstances\nwhere the developer is acting on behalf of the owner of the shared album.\n\nEnrichment types\n\nGoogle Photos supports three types of enrichments in albums: text,\nlocations, and maps.\n\nText enrichments\n\nA text enrichment is a plain text string that can be inserted to annotate the\nalbum.\n\nLocation enrichments\n\nA location enrichment is a marker and the name of the place that can be inserted\nto annotate a location.\n\nMap enrichments\n\nA map enrichment is a map with a specified origin and destination that can be\ninserted in the album.\n\nPositions\n\nTo insert media items and album enrichments, specify the position of the album.\nA position is optional for media items, but must be specified for album\nenrichment.\n\nA position can only be specified when\n[creating a media item](/photos/library/guides/upload-media#creating-media-item)\nor adding enrichments. Existing media items in an album can't be reorganized, so\nit's important to set the position of an item when it's being added.\n\nStart of album\n\nA media/enrichment item can be added to the start of the album as absolute\npositioning.\n\nEnd of album\n\nA media/enrichment item can be added to the end of the album as absolute\npositioning.\n\nRelative to media item\n\nA media/enrichment item can be added relative to a media item beginning after\nits position in the album.\n\nRelative to enrichment item\n\nA media/enrichment item can be added relative to an enrichment item beginning\nafter its position in the album.\n\nAdding enrichments to album\n\nEnrichments are added one at a time and must be added to a position in an album.\nTo add enrichments to an album, call\n[`albums.addEnrichment`](/photos/library/legacy/reference/rest/v1/albums/addEnrichment).\n\nIf the request is successful, it returns the `id` of the enrichment item, which\ncan be used to position media items or other enrichments. \n\nREST\n\nHere is a POST request: \n\n```\nPOST https://photoslibrary.googleapis.com/v1/albums/album-id:addEnrichment\nContent-type: application/json\nAuthorization: Bearer oauth2-token\n\u003cvar translate=\"no\"\u003erequest-body\u003c/var\u003e\n```\n\nThe request body consists of the enrichment item and its position: \n\n```restructuredtext\n{\n \"newEnrichmentItem\": {\n enrichment-to-be-added\n },\n \"albumPosition\": {\n position-of-enrichment\n}\n```\n\nHere is a sample response: \n\n```restructuredtext\n{\n \"enrichmentItem\": {\n \"id\": \"enrichment-item-id\",\n }\n}\n```\n\nJava \n\n```java\ntry {\n // Create the enrichment using the NewEnrichmentItemFactory helper\n NewEnrichmentItem newEnrichmentItem = NewEnrichmentItemFactory.createTextEnrichment(\"\");\n\n // Set the position of the enrichment within the album\n AlbumPosition albumPosition = AlbumPositionFactory.createFirstInAlbum();\n\n // To add an enrichment, specify the album, the enrichment item,\n // and the position in the album where the enrichment is to be added\n AddEnrichmentToAlbumResponse response = photosLibraryClient\n .addEnrichmentToAlbum(albumId, newEnrichmentItem, albumPosition);\n // The response contains an EnrichmentItem\n // whose ID can be used to position media items or other enrichments\n EnrichmentItem enrichmentItem = response.getEnrichmentItem();\n String itemId = enrichmentItem.getId();\n} catch (ApiException e) {\n // Handle error\n}\n```\n\nPHP \n\n```php\n// Create the enrichment item using the PhotosLibraryResourceFactory helper\n$newEnrichmentItem = PhotosLibraryResourceFactory::newEnrichmentItemWithText(\"\");\n// ...\n// Set the position of the enrichment within the album\n$position = new AlbumPosition();\n// ...\ntry {\n // To add an enrichment, specify the album, the enrichment item,\n // and the position in the album where the enrichment is to be added\n $response = $photosLibraryClient-\u003eaddEnrichmentToAlbum($albumId, $newEnrichmentItem, $position);\n // The response contains an EnrichmentItem\n // whose ID can be used to position media items or other enrichments\n $enrichmentItem = $response-\u003egetEnrichmentItem();\n $itemId = $enrichmentItem-\u003egetId();\n\n} catch (\\Google\\ApiCore\\ApiException $e) {\n // Handle error\n}\n```\n\nSupported enrichments\n\nText enrichments\n\nText enrichments contain a single text string (no more than 1000 characters), as\nshown in the following example: \n\nREST \n\n```restructuredtext\n{\n \"text\": \"Text to be shown\"\n}\n```\n\nJava \n\n```java\n// Use the NewEnrichmentItemFactory helper to create a text enrichment item\nNewEnrichmentItem newEnrichmentItem =\n NewEnrichmentItemFactory.createTextEnrichment(\"text to be shown\");\n```\n\nPHP \n\n```php\n$newEnrichmentItem = PhotosLibraryResourceFactory::newEnrichmentItemWithText(\"text to be shown\");\n```\n\nLocation enrichments\n\nLocation enrichments consist of an arbitrary location name and the latitude and\nlongitude position. The `locationName` is limited to 500 characters. \n\nREST \n\n```restructuredtext\n{\n \"location\": {\n \"locationName\": \"Australia\",\n \"latlng\": {\n \"latitude\": \"-21.197\",\n \"longitude\": \"95.821\"\n }\n }\n}\n```\n\nJava \n\n```java\n// Use the NewEnrichmentItemFactory helper to create a location enrichment\n// with the name, latitude, and longitude of the location\nNewEnrichmentItem newEnrichmentItem =\n NewEnrichmentItemFactory.createLocationEnrichment(\"Australia\", -21.197, 95.821);\n```\n\nPHP \n\n```php\n// Create a new location object and set the name, latitude, and longitude of the location\n$newLocation = new Location();\n$newLocation-\u003esetLocationName(\"Australia\");\n$newLocation-\u003esetLatlng((new LatLng())-\u003esetLatitude(-21.197)-\u003esetLongitude(95.821));\n\n$newEnrichmentItem = PhotosLibraryResourceFactory::newEnrichmentItemWithLocation($newLocation);\n```\n\nMap enrichments\n\nMap enrichments show two locations, each consisting of a name and the latitude\nand longitude. Similar to the location enrichment, the `locationName` within the\norigin and `destination` is limited to 500 characters. \n\nREST \n\n```restructuredtext\n{\n \"origin\": {\n \"locationName\": \"Australia\",\n \"latlng\": {\n \"latitude\": \"-21.197\",\n \"longitude\": \"95.821\"\n }\n },\n \"destination\": {\n \"locationName\": \"San Francisco\",\n \"latlng\": {\n \"latitude\": \"37.757\",\n \"longitude\": \"122.507\"\n }\n }\n}\n```\n\nJava \n\n```java\n// Use the NewEnrichmentItemFactory helper to create a map enrichment item for\n// an origin and a destination location\nNewEnrichmentItem newEnrichmentItem = NewEnrichmentItemFactory.createMapEnrichment(\n \"Australia\", -21.197, 95.821, // origin\n \"San Francisco\", 37.757, 122.507 // destination\n);\n```\n\nPHP \n\n```php\n// Create two new location objects to create a map enrichment item\n// for an origin and a destination location\n$locationAustralia = new Location();\n$locationAustralia-\u003esetLocationName(\"Australia\");\n$locationAustralia-\u003esetLatlng((new LatLng())-\u003esetLatitude(-21.197)-\u003esetLongitude(95.821));\n\n$locationSanFrancisco = new Location();\n$locationSanFrancisco-\u003esetLocationName(\"San Francisco\");\n$locationSanFrancisco-\u003esetLatlng((new LatLng())-\u003esetLatitude(37.757)-\u003esetLongitude(122.507));\n\n$newEnrichmentItem =\n PhotosLibraryResourceFactory::newEnrichmentItemWithMap($locationAustralia, $locationSanFrancisco);\n```\n\nSupported positioning\n\nStart of album\n\nThe position `FIRST_IN_ALBUM` refers to the start of the album. Items located\nhere are shown to the user first: \n\nREST \n\n```restructuredtext\n{\n \"position\": \"FIRST_IN_ALBUM\",\n}\n```\n\nJava \n\n```java\nAlbumPosition albumPosition = AlbumPositionFactory.createFirstInAlbum();\n```\n\nPHP \n\n```php\n$albumPosition = new AlbumPosition();\n$albumPosition-\u003esetPosition(PositionType::FIRST_IN_ALBUM);\n```\n\nEnd of album\n\nThe position `LAST_IN_ALBUM` refers to the end of the album. Items located here\nare shown to the user last. \n\nREST \n\n```restructuredtext\n{\n \"position\": \"LAST_IN_ALBUM\",\n}\n```\n\nJava \n\n```java\nAlbumPosition albumPosition = AlbumPositionFactory.createLastInAlbum();\n```\n\nPHP \n\n```php\n$albumPosition = new AlbumPosition();\n$albumPosition-\u003esetPosition(PositionType::LAST_IN_ALBUM);\n```\n\nRelative to media item\n\nSpecifying the position `relativeMediaItem` refers to a position relative to a\nmedia item. The items are added after the specified media item. \n\nREST \n\n```restructuredtext\n{\n \"position\": \"after-media-item\",\n \"relativeMediaItemId\": \"media-item-id\"\n}\n```\n\nJava \n\n```java\nAlbumPosition albumPosition = AlbumPositionFactory.createAfterMediaItem(mediaItemId);\n```\n\nPHP \n\n```php\n$albumPosition = PhotosLibraryResourceFactory::albumPositionAfterMediaItem($mediaItemId);\n```\n\nRelative to enrichment item\n\nSpecifying a `relativeEnrichmentItemId` refers to a position relative to an\nenrichment item. The items are added after the specified enrichment item. \n\nREST \n\n```restructuredtext\n{\n \"position\": \"after-enrichment-item\",\n \"relativeEnrichmentItemId\": \"enrichment-item-id\"\n}\n```\n\nJava \n\n```java\nAlbumPosition albumPosition = AlbumPositionFactory.createAfterEnrichmentItem(enrichmentItemId);\n```\n\nPHP \n\n```php\n$albumPosition = PhotosLibraryResourceFactory::albumPositionAfterEnrichmentItem($enrichmentItemId);\n```\n\nModifying enrichments\n\nCurrently, there is no way to modify enrichments. However, once an enrichment\nhas been created and added to an album, the user can modify the enrichments\nthrough the Google Photos app."]]