您正在查看 Google Photos Library API 的旧版文档。
Method: mediaItems.patch
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2024-11-07。
[null,null,["最后更新时间 (UTC):2024-11-07。"],[[["This API updates an existing media item with a new description using a PATCH request."],["You can only update the description of media items created via the API and owned by the user."],["The request requires the `mediaItem.id` as a path parameter and `updateMask` with a value of `description` as a query parameter."],["It uses the `https://www.googleapis.com/auth/photoslibrary.edit.appcreateddata` authorization scope for access."],["The request and response bodies utilize the `MediaItem` object for data transfer."]]],["This documentation details how to update a media item's `description` via a PATCH request. The request uses the `mediaItem.id` path parameter to identify the target media. The `updateMask` query parameter, with the sole valid value \"description\", specifies the field to update. The request body contains the updated `MediaItem` data. A successful response returns the updated `MediaItem`. Authorization requires the `photoslibrary.edit.appcreateddata` OAuth scope.\n"]]