Learn about the new Picker API and important Library API changes.
Details here.
मीडिया आइटम मैनेज करें
मीडिया आइटम अपलोड करने के बाद, उन्हें ऐक्सेस और वापस पाया जा सकता है. साथ ही, उनके ब्यौरे भी बदले जा सकते हैं.
अनुमति का ज़रूरी दायरा
ऐप्लिकेशन से बनाए गए कॉन्टेंट के ब्यौरे बदलने के लिए, photoslibrary.edit.appcreateddata
स्कोप की ज़रूरत होती है. स्कोप के बारे में ज़्यादा जानकारी के लिए, अनुमति के दायरे देखें.
किसी मीडिया आइटम का ब्यौरा बदलने के लिए, मीडिया आइटम के आइडेंटिफ़ायर के साथ media items update
call
बनाएं और अनुरोध में नया ब्यौरा शामिल करें.
किसी मीडिया आइटम की जानकारी बदलने के लिए, यह ज़रूरी है कि आपके ऐप्लिकेशन ने वह मीडिया आइटम अपलोड किया हो. साथ ही, पुष्टि किए गए मौजूदा उपयोगकर्ता के पास उसका मालिकाना हक होना चाहिए. ब्यौरे में 1,000 से ज़्यादा वर्ण नहीं होने चाहिए.
मीडिया आइटम का ब्यौरा अपडेट करने के लिए, यहां PATCH अनुरोध हेडर दिया गया है:
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"
}
जब तक कुछ अलग से न बताया जाए, तब तक इस पेज की सामग्री को Creative Commons Attribution 4.0 License के तहत और कोड के नमूनों को Apache 2.0 License के तहत लाइसेंस मिला है. ज़्यादा जानकारी के लिए, Google Developers साइट नीतियां देखें. Oracle और/या इससे जुड़ी हुई कंपनियों का, Java एक रजिस्टर किया हुआ ट्रेडमार्क है.
आखिरी बार 2024-11-09 (UTC) को अपडेट किया गया.
[null,null,["आखिरी बार 2024-11-09 (UTC) को अपडेट किया गया."],[[["After uploading media items to Google Photos, you can change their descriptions using the Google Photos API."],["Modifying descriptions of app-created content requires the `photoslibrary.edit.appcreateddata` scope and ownership by the authenticated user."],["To update a description, use the `mediaItems/patch` endpoint with the item's ID and a request body containing the new description."],["The `updateMask` parameter in the request URL specifies that only the description is being modified."],["The response to a successful update request will return the complete updated media item object."]]],["To modify a media item's description, use a `media items update call` with a PATCH request, specifying the item's ID and the `updateMask` parameter. Include the new description in the request body, ensuring it's under 1,000 characters. This requires the `photoslibrary.edit.appcreateddata` scope, with the app having uploaded the media, and the authenticated user must be the owner. A successful request returns the updated media item details, including the new description.\n"]]