ListAlbumPhotos
描述
分批获取相簿中的照片列表
请求参数
参数名 | 类型 | 是否必须 | 说明 |
---|---|---|---|
Action | String | 是 | ListAlbumPhotos |
AlbumId | Long | 是 | 指定相簿的Id |
State | String | 是 | 注意:State不是照片的状态,而是照片与相簿关系的状态。可选值为active(表示照片属于相簿中),removed(表示照片已从相簿中移除)和all(表示所有状态) |
StoreName | String | 是 | PhotoStore的名称 |
Cursor | String | 否 | 指定拉取数据的游标。默认值为0,表示从最老的数据开始分批获取。 |
Direction | String | 否 | 指定拉取数据的方向,可选值为backward和forward。forward表示获取比指定游标更新的数据,backward表示获取比指定游标更老的数据。默认值为forward |
Size | Integer | 否 | 指定服务端返回的最大记录条数,最大值为500。默认值为50。 |
LibraryId | String | 否 | 照片库标识。采用AK认证时必选,采用STS认证时可选。了解不同认证方式的区别。 |
请求示例
https://cloudphoto.cn-shanghai.aliyuncs.com/?Action=ListAlbumPhotos
&AlbumId=822504789718867968
&Cursor=0
&Direction=forward
&Size=10
&State=all
&StoreName=cloudphoto-demo
&LibraryId=alice-001
&<公共请求参数>
返回参数
参数名 | 类型 | 说明 |
---|---|---|
RequestId | String | 唯一标识本次请求的ID |
Code | String | 响应状态码,Success表示成功的响应 |
Message | String | 响应状态详细描述 |
Action | String | ListAlbumPhotos |
NextCursor | String | 表示获取下一批数据的起始游标,如果为EOF则表示没有数据了。 |
Results | 数组 | 详见结果信息 |
TotalCount | String | 符合条件的记录总数 |
Results
参数名 | 类型 | 说明 |
---|---|---|
PhotoId | Long | 照片的唯一ID |
State | String | 照片与相簿的关系的状态 |
返回示例
JSON格式
{
"TotalCount":1,
"Action":"ListAlbumPhotos",
"Message":"success",
"RequestId":"33439FC2-4729-4D74-A629-95CCF67ADA4E",
"NextCursor":"1501586905955:829177180117278720",
"Results":[
{
"State":"active",
"PhotoId":822522391505674240
}
],
"Code":"Success"
}
XML格式
<?xml version="1.0" encoding="UTF-8"?>
<ListAlbumPhotosResponse>
<Action>ListAlbumPhotos</Action>
<TotalCount>1</TotalCount>
<Message>success</Message>
<RequestId>010AA821-CE89-44BA-9861-3BDED9CF1095</RequestId>
<NextCursor>1501586905955:829177180117278720</NextCursor>
<Results>
<Result>
<State>active</State>
<PhotoId>822522391505674240</PhotoId>
</Result>
</Results>
<Code>Success</Code>
</ListAlbumPhotosResponse>
版权声明
本文仅代表作者观点,不代表本站立场。
本文系作者授权发表,未经许可,不得转载。
评论