আপনি Google Photos Library API-এর জন্য লিগ্যাসি ডকুমেন্টেশন দেখছেন।
মিডিয়া আইটেম পরিচালনা করুন
সেভ করা পৃষ্ঠা গুছিয়ে রাখতে 'সংগ্রহ' ব্যবহার করুন
আপনার পছন্দ অনুযায়ী কন্টেন্ট সেভ করুন ও সঠিক বিভাগে রাখুন।
আপনি সেগুলি আপলোড করার পরে মিডিয়া আইটেমগুলি অ্যাক্সেস করার পাশাপাশি, আপনি তাদের বিবরণও পরিবর্তন করতে পারেন৷
প্রয়োজনীয় অনুমোদনের সুযোগ
মিডিয়া আইটেমগুলি তৈরি করার পরে তাদের বিবরণ পরিবর্তন করতে, photoslibrary.edit.appcreateddata
স্কোপ ব্যবহার করুন।
একটি মিডিয়া আইটেমের বিবরণ পরিবর্তন করতে, মিডিয়া আইটেমটির শনাক্তকারীর সাথে একটি media items update call
করুন এবং অনুরোধে নতুন বিবরণ অন্তর্ভুক্ত করুন।
একটি মিডিয়া আইটেমের বিবরণ পরিবর্তন করতে, আপনার অ্যাপটি অবশ্যই মিডিয়া আইটেমটি আপলোড করেছে এবং বর্তমানে প্রমাণীকৃত ব্যবহারকারীকে অবশ্যই মালিক হতে হবে৷ বর্ণনার দৈর্ঘ্য 1,000 অক্ষরের বেশি হতে পারে না।
বিশ্রাম
মিডিয়া আইটেমের বিবরণ আপডেট করার জন্য এখানে একটি প্যাচ অনুরোধ শিরোনাম রয়েছে:
PATCH https://photoslibrary.googleapis.com/v1/mediaItems/media-item-id?updateMask=description
ইউআরএলে updateMask
প্যারামিটার দ্বারা নির্দেশিত ফিল্ড মাস্ক অন্তর্ভুক্ত করে কোন বৈশিষ্ট্যগুলি আপডেট করা হচ্ছে তা এই অনুরোধটি নির্ধারণ করে।
অনুরোধের মূল অংশে নতুন বিবরণ অন্তর্ভুক্ত করুন:
{
"description": "new-media-item-description"
}
সফল হলে, প্রতিক্রিয়া আপডেট করা মিডিয়া আইটেম ফিরিয়ে দেয়:
{
"id": "media-item-id",
"description": "new-media-item-description",
"productUrl": "media-item-product-url",
"baseUrl": "media-items-in-album",
"mimeType": "mime-type-of-media",
"mediaMetadata": {
...
},
"contributorInfo": {
...
},
"fileName": "item-filename"
}
জাভা
try {
// Update the description of the media item.
// The new description must not be null.
MediaItem updatedItem = photosLibraryClient.updateMediaItemDescription(mediaItem, "new-media-item-description");
} catch (ApiException e) {
// Handle error
}
পিএইচপি
try {
// ID of the media item to update.
$mediaItemId = "MEDIA_ITEM_ID";
// New description of the media item.
$newDescription = "new-media-item-description";
// Update the description of the media item identified.
$mediaItem = $photosLibraryClient->updateMediaItemDescription($mediaItemId, $newDescription);
} catch (\Google\ApiCore\ApiException $e) {
// Handle error
}
অন্য কিছু উল্লেখ না করা থাকলে, এই পৃষ্ঠার কন্টেন্ট Creative Commons Attribution 4.0 License-এর অধীনে এবং কোডের নমুনাগুলি Apache 2.0 License-এর অধীনে লাইসেন্স প্রাপ্ত। আরও জানতে, Google Developers সাইট নীতি দেখুন। Java হল Oracle এবং/অথবা তার অ্যাফিলিয়েট সংস্থার রেজিস্টার্ড ট্রেডমার্ক।
2025-08-29 UTC-তে শেষবার আপডেট করা হয়েছে।
[null,null,["2025-08-29 UTC-তে শেষবার আপডেট করা হয়েছে।"],[[["\u003cp\u003eYou can update descriptions of media items uploaded by your app using the \u003ccode\u003ephotoslibrary.edit.appcreateddata\u003c/code\u003e scope.\u003c/p\u003e\n"],["\u003cp\u003eTo update a description, send a PATCH request to the media item's endpoint with the \u003ccode\u003eupdateMask\u003c/code\u003e parameter set to \u003ccode\u003edescription\u003c/code\u003e and the new description in the request body.\u003c/p\u003e\n"],["\u003cp\u003eThe authenticated user must be the owner of the media item to modify its description, and descriptions are limited to 1,000 characters.\u003c/p\u003e\n"],["\u003cp\u003eSuccessful updates return the entire updated media item resource, including the new description.\u003c/p\u003e\n"],["\u003cp\u003eCode samples for Java and PHP demonstrate how to programmatically update media item descriptions.\u003c/p\u003e\n"]]],["Media item descriptions can be modified after upload using the `photoslibrary.edit.appcreateddata` scope. This is done via a `mediaItems update call` (PATCH request) that includes the media item's ID and the new description in the request body. The authenticated user must be the owner and have uploaded the item. Descriptions can have a maximum of 1,000 characters. A field mask in the URL determines properties to be updated. Sample code snippets in REST, Java, and PHP are provided.\n"],null,["# Manage media items\n\nIn addition to [accessing](/photos/library/guides/access-media-items) media\nitems after you [upload](/photos/library/guides/upload-media) them, you can\nalso change their descriptions.\n\nRequired authorization scope\n----------------------------\n\nTo change the descriptions of media items after their creation, use the\n`photoslibrary.edit.appcreateddata` scope.\n\nChanging media item descriptions\n--------------------------------\n\nTo change a media item's description, make a\n[`media items update call`](/photos/library/legacy/reference/rest/v1/mediaItems/patch)\nwith the identifier of the media item, and include the new description in the\nrequest.\n\nTo change a media item's description, your app must have uploaded the media\nitem, and the currently authenticated user must be the owner. Descriptions can\nbe no more than 1,000 characters in length. \n\n### REST\n\nHere's a PATCH request header to update a media item description: \n\n```\nPATCH https://photoslibrary.googleapis.com/v1/mediaItems/media-item-id?updateMask=description\n```\n\nThis request determines what properties are being updated by including a\nfield mask, indicated by the `updateMask` parameter in the URL.\n\nInclude the new description in the body of the request: \n\n```restructuredtext\n{\n \"description\": \"new-media-item-description\"\n}\n```\n\nIf successful, the response returns the updated media item: \n\n```restructuredtext\n{\n \"id\": \"media-item-id\",\n \"description\": \"\u003cvar translate=\"no\"\u003enew-media-item-description\u003c/var\u003e\",\n \"productUrl\": \"media-item-product-url\",\n \"baseUrl\": \"media-items-in-album\",\n \"mimeType\": \"mime-type-of-media\",\n \"mediaMetadata\": {\n ...\n },\n \"contributorInfo\": {\n ...\n },\n \"fileName\": \"\u003cvar translate=\"no\"\u003eitem-filename\u003c/var\u003e\"\n}\n```\n\n### Java\n\n```java\ntry {\n // Update the description of the media item.\n // The new description must not be null.\n MediaItem updatedItem = photosLibraryClient.updateMediaItemDescription(mediaItem, \"new-media-item-description\");\n} catch (ApiException e) {\n // Handle error\n}\n```\n\n### PHP\n\n```php\ntry {\n\n // ID of the media item to update.\n $mediaItemId = \"MEDIA_ITEM_ID\";\n\n // New description of the media item.\n $newDescription = \"new-media-item-description\";\n\n // Update the description of the media item identified.\n $mediaItem = $photosLibraryClient-\u003eupdateMediaItemDescription($mediaItemId, $newDescription);\n\n} catch (\\Google\\ApiCore\\ApiException $e) {\n // Handle error\n}\n```"]]