您正在查看 Google Photos Library API 的旧版文档。
REST Resource: sharedAlbums
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
资源:影集
表示 Google 相册中的影集。影集是媒体内容的容器。如果应用分享影集,则该影集将包含额外的 shareInfo
属性。
JSON 表示法 |
{
"id": string,
"title": string,
"productUrl": string,
"isWriteable": boolean,
"shareInfo": {
object (ShareInfo )
},
"mediaItemsCount": string,
"coverPhotoBaseUrl": string,
"coverPhotoMediaItemId": string
} |
字段 |
id |
string
影集的标识符。这是一个永久标识符,可用于在会话之间标识此影集。
|
title |
string
在用户的 Google 相册账号中显示的影集的名称。此字符串不应超过 500 个字符。
|
productUrl |
string
[仅适用于输出] 影集的 Google 相册网址。只有在登录 Google 相册账号后,用户才能访问此链接。
|
isWriteable |
boolean
[仅限输出] 如果您可以在此影集中创建媒体内容,则为 true。此字段基于授权的范围和影集的权限。更改范围或影集权限后,此字段便会更新。
|
shareInfo |
object (ShareInfo )
[仅限输出] 与共享影集相关的信息。仅当该影集为共享影集、其创建者为开发者,且用户已向 photoslibrary.sharing 范围授权时,系统才会填充此字段。
|
mediaItemsCount |
string (int64 format)
[仅限输出] 影集中的媒体内容数量。
|
coverPhotoBaseUrl |
string
[仅适用于输出] 指向封面照片字节的网址。请勿直接使用此参数。参数在使用前应附加到此网址。如需查看所支持参数的完整列表,请参阅开发者文档。例如,'=w2048-h1024' 会将封面照片的尺寸设置为 2048 像素(宽)× 1024 像素(高)。
|
coverPhotoMediaItemId |
string
与封面照片相关联的媒体内容的标识符。
|
方法 |
|
根据指定的 shareToken 返回影集。 |
|
代表 Google 相册用户加入共享影集。 |
|
代表 Google 相册用户退出先前加入的共享影集。 |
|
列出用户 Google 相册应用“分享”标签页中提供的所有共享影集。 |
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-25。
[[["易于理解","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"]],["最后更新时间 (UTC):2025-07-25。"],[[["\u003cp\u003eAlbums in Google Photos are containers for media items and can be shared.\u003c/p\u003e\n"],["\u003cp\u003eShared albums have a \u003ccode\u003eshareInfo\u003c/code\u003e property and developers can access them with the \u003ccode\u003ephotoslibrary.sharing\u003c/code\u003e scope.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eAlbum\u003c/code\u003e resource provides methods to get, join, leave, and list shared albums.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eAlbum\u003c/code\u003e properties provide information such as ID, title, URL, writability status, media count, and cover photo details.\u003c/p\u003e\n"]]],["Albums in Google Photos are containers for media items, identified by a unique `id` and a user-facing `title`. Key details include the album's `productUrl`, whether it's `isWriteable`, `mediaItemsCount`, and cover photo information (`coverPhotoBaseUrl`, `coverPhotoMediaItemId`). Shared albums contain a `shareInfo` property. Actions include: retrieving albums with a `shareToken`, joining, leaving, and listing shared albums via methods such as `get`, `join`, `leave`, and `list`.\n"],null,[]]