473 lines
13 KiB
Markdown
473 lines
13 KiB
Markdown
# Album
|
|
|
|
相册服务
|
|
|
|
- [/cloud.Album/CreateAlbum](#cloudalbumcreatealbum)
|
|
- [/cloud.Album/GetAlbum](#cloudalbumgetalbum)
|
|
- [/cloud.Album/UpdateAlbum](#cloudalbumupdatealbum)
|
|
- [/cloud.Album/DeleteAlbum](#cloudalbumdeletealbum)
|
|
- [/cloud.Album/ListAlbums](#cloudalbumlistalbums)
|
|
- [/cloud.Album/SetCoverPhoto](#cloudalbumsetcoverphoto)
|
|
- [/cloud.Album/UploadPhoto](#cloudalbumuploadphoto)
|
|
- [/cloud.Album/GetPhoto](#cloudalbumgetphoto)
|
|
- [/cloud.Album/UpdatePhoto](#cloudalbumupdatephoto)
|
|
- [/cloud.Album/DeletePhoto](#cloudalbumdeletephoto)
|
|
- [/cloud.Album/ListPhotos](#cloudalbumlistphotos)
|
|
- [/cloud.Album/MovePhoto](#cloudalbummovephoto)
|
|
|
|
## /cloud.Album/CreateAlbum
|
|
|
|
创建相册
|
|
|
|
|
|
### Request
|
|
```javascript
|
|
{
|
|
cloud_id: "0", // type<uint64>
|
|
cloud_identity: "", // type<string>
|
|
name: "", // type<string>, 相册名称
|
|
description: "", // type<string>, 相册描述
|
|
cover_photo: "", // type<string>, 封面照片URL
|
|
is_private: false, // type<bool>, 是否私有
|
|
}
|
|
```
|
|
|
|
### Reply
|
|
```javascript
|
|
{
|
|
code: 0, // type<int32>, 状态码
|
|
message: "", // type<string>, 状态说明
|
|
details: "", // type<string>, 数据
|
|
timeseq: "0", // type<int64>, 响应时间序列
|
|
}
|
|
```
|
|
## /cloud.Album/GetAlbum
|
|
|
|
获取相册详情
|
|
|
|
|
|
### Request
|
|
```javascript
|
|
{
|
|
id: "0", // type<int64>, 唯一ID
|
|
identity: "", // type<string>, 唯一码
|
|
}
|
|
```
|
|
|
|
### Reply
|
|
```javascript
|
|
{
|
|
id: "0", // type<uint64>
|
|
identity: "", // type<string>
|
|
name: "", // type<string>, 相册名称
|
|
description: "", // type<string>, 相册描述
|
|
cover_photo: "", // type<string>, 封面照片URL
|
|
is_private: false, // type<bool>, 是否私有
|
|
created_at: "", // type<string>
|
|
updated_at: "", // type<string>
|
|
// 关联关系
|
|
photos: [{
|
|
id: "0", // type<uint64>
|
|
identity: "", // type<string>
|
|
album_id: "0", // type<uint64>, 专辑ID
|
|
title: "", // type<string>, 照片标题
|
|
description: "", // type<string>, 照片描述
|
|
file_path: "", // type<string>, 文件路径
|
|
file_size: "0", // type<int64>, 文件大小
|
|
mime_type: "", // type<string>, 文件类型
|
|
width: 0, // type<int32>, 图片宽度
|
|
height: 0, // type<int32>, 图片高度
|
|
taken_at: "", // type<string>, 拍摄时间
|
|
location: "", // type<string>, 拍摄地点
|
|
tags: "", // type<string>, 标签,逗号分隔
|
|
created_at: "", // type<string>
|
|
updated_at: "", // type<string>
|
|
// 关联关系
|
|
album: {}, // type<CloudAlbumItem>
|
|
}], // list<CloudPhotoItem>, 相册下的照片
|
|
}
|
|
```
|
|
## /cloud.Album/UpdateAlbum
|
|
|
|
更新相册
|
|
|
|
|
|
### Request
|
|
```javascript
|
|
{
|
|
id: "0", // type<uint64>
|
|
identity: "", // type<string>
|
|
name: "", // type<string>, 相册名称
|
|
description: "", // type<string>, 相册描述
|
|
cover_photo: "", // type<string>, 封面照片URL
|
|
is_private: false, // type<bool>, 是否私有
|
|
created_at: "", // type<string>
|
|
updated_at: "", // type<string>
|
|
// 关联关系
|
|
photos: [{
|
|
id: "0", // type<uint64>
|
|
identity: "", // type<string>
|
|
album_id: "0", // type<uint64>, 专辑ID
|
|
title: "", // type<string>, 照片标题
|
|
description: "", // type<string>, 照片描述
|
|
file_path: "", // type<string>, 文件路径
|
|
file_size: "0", // type<int64>, 文件大小
|
|
mime_type: "", // type<string>, 文件类型
|
|
width: 0, // type<int32>, 图片宽度
|
|
height: 0, // type<int32>, 图片高度
|
|
taken_at: "", // type<string>, 拍摄时间
|
|
location: "", // type<string>, 拍摄地点
|
|
tags: "", // type<string>, 标签,逗号分隔
|
|
created_at: "", // type<string>
|
|
updated_at: "", // type<string>
|
|
// 关联关系
|
|
album: {}, // type<CloudAlbumItem>
|
|
}], // list<CloudPhotoItem>, 相册下的照片
|
|
}
|
|
```
|
|
|
|
### Reply
|
|
```javascript
|
|
{
|
|
code: 0, // type<int32>, 状态码
|
|
message: "", // type<string>, 状态说明
|
|
details: "", // type<string>, 数据
|
|
timeseq: "0", // type<int64>, 响应时间序列
|
|
}
|
|
```
|
|
## /cloud.Album/DeleteAlbum
|
|
|
|
删除相册
|
|
|
|
|
|
### Request
|
|
```javascript
|
|
{
|
|
id: "0", // type<int64>, 唯一ID
|
|
identity: "", // type<string>, 唯一码
|
|
}
|
|
```
|
|
|
|
### Reply
|
|
```javascript
|
|
{
|
|
code: 0, // type<int32>, 状态码
|
|
message: "", // type<string>, 状态说明
|
|
details: "", // type<string>, 数据
|
|
timeseq: "0", // type<int64>, 响应时间序列
|
|
}
|
|
```
|
|
## /cloud.Album/ListAlbums
|
|
|
|
获取相册列表
|
|
|
|
|
|
### Request
|
|
```javascript
|
|
{
|
|
page_no: "0", // type<int64>, 页数
|
|
page_size: "0", // type<int64>, 每页记录数
|
|
params: {
|
|
"": ""
|
|
}, // map<string,string>, 条件参数,key=val,eg key:category_id=?,vlaue=11
|
|
}
|
|
```
|
|
|
|
### Reply
|
|
```javascript
|
|
{
|
|
albums: [{
|
|
id: "0", // type<uint64>
|
|
identity: "", // type<string>
|
|
name: "", // type<string>, 相册名称
|
|
description: "", // type<string>, 相册描述
|
|
cover_photo: "", // type<string>, 封面照片URL
|
|
is_private: false, // type<bool>, 是否私有
|
|
created_at: "", // type<string>
|
|
updated_at: "", // type<string>
|
|
// 关联关系
|
|
photos: [{
|
|
id: "0", // type<uint64>
|
|
identity: "", // type<string>
|
|
album_id: "0", // type<uint64>, 专辑ID
|
|
title: "", // type<string>, 照片标题
|
|
description: "", // type<string>, 照片描述
|
|
file_path: "", // type<string>, 文件路径
|
|
file_size: "0", // type<int64>, 文件大小
|
|
mime_type: "", // type<string>, 文件类型
|
|
width: 0, // type<int32>, 图片宽度
|
|
height: 0, // type<int32>, 图片高度
|
|
taken_at: "", // type<string>, 拍摄时间
|
|
location: "", // type<string>, 拍摄地点
|
|
tags: "", // type<string>, 标签,逗号分隔
|
|
created_at: "", // type<string>
|
|
updated_at: "", // type<string>
|
|
// 关联关系
|
|
album: {}, // type<CloudAlbumItem>
|
|
}], // list<CloudPhotoItem>, 相册下的照片
|
|
}], // list<CloudAlbumItem>
|
|
total: "0", // type<int64>
|
|
}
|
|
```
|
|
## /cloud.Album/SetCoverPhoto
|
|
|
|
设置封面照片
|
|
|
|
|
|
### Request
|
|
```javascript
|
|
{
|
|
album_id: "0", // type<uint64>
|
|
photo_id: "0", // type<uint64>
|
|
}
|
|
```
|
|
|
|
### Reply
|
|
```javascript
|
|
{
|
|
code: 0, // type<int32>, 状态码
|
|
message: "", // type<string>, 状态说明
|
|
details: "", // type<string>, 数据
|
|
timeseq: "0", // type<int64>, 响应时间序列
|
|
}
|
|
```
|
|
## /cloud.Album/UploadPhoto
|
|
|
|
上传照片
|
|
|
|
|
|
### Request
|
|
```javascript
|
|
{
|
|
id: "0", // type<uint64>
|
|
identity: "", // type<string>
|
|
album_id: "0", // type<uint64>, 专辑ID
|
|
title: "", // type<string>, 照片标题
|
|
description: "", // type<string>, 照片描述
|
|
file_path: "", // type<string>, 文件路径
|
|
file_size: "0", // type<int64>, 文件大小
|
|
mime_type: "", // type<string>, 文件类型
|
|
width: 0, // type<int32>, 图片宽度
|
|
height: 0, // type<int32>, 图片高度
|
|
taken_at: "", // type<string>, 拍摄时间
|
|
location: "", // type<string>, 拍摄地点
|
|
tags: "", // type<string>, 标签,逗号分隔
|
|
created_at: "", // type<string>
|
|
updated_at: "", // type<string>
|
|
// 关联关系
|
|
album: {
|
|
id: "0", // type<uint64>
|
|
identity: "", // type<string>
|
|
name: "", // type<string>, 相册名称
|
|
description: "", // type<string>, 相册描述
|
|
cover_photo: "", // type<string>, 封面照片URL
|
|
is_private: false, // type<bool>, 是否私有
|
|
created_at: "", // type<string>
|
|
updated_at: "", // type<string>
|
|
// 关联关系
|
|
photos: [{}], // list<CloudPhotoItem>, 相册下的照片
|
|
}, // type<CloudAlbumItem>
|
|
}
|
|
```
|
|
|
|
### Reply
|
|
```javascript
|
|
{
|
|
code: 0, // type<int32>, 状态码
|
|
message: "", // type<string>, 状态说明
|
|
details: "", // type<string>, 数据
|
|
timeseq: "0", // type<int64>, 响应时间序列
|
|
}
|
|
```
|
|
## /cloud.Album/GetPhoto
|
|
|
|
获取照片详情
|
|
|
|
|
|
### Request
|
|
```javascript
|
|
{
|
|
id: "0", // type<int64>, 唯一ID
|
|
identity: "", // type<string>, 唯一码
|
|
}
|
|
```
|
|
|
|
### Reply
|
|
```javascript
|
|
{
|
|
id: "0", // type<uint64>
|
|
identity: "", // type<string>
|
|
album_id: "0", // type<uint64>, 专辑ID
|
|
title: "", // type<string>, 照片标题
|
|
description: "", // type<string>, 照片描述
|
|
file_path: "", // type<string>, 文件路径
|
|
file_size: "0", // type<int64>, 文件大小
|
|
mime_type: "", // type<string>, 文件类型
|
|
width: 0, // type<int32>, 图片宽度
|
|
height: 0, // type<int32>, 图片高度
|
|
taken_at: "", // type<string>, 拍摄时间
|
|
location: "", // type<string>, 拍摄地点
|
|
tags: "", // type<string>, 标签,逗号分隔
|
|
created_at: "", // type<string>
|
|
updated_at: "", // type<string>
|
|
// 关联关系
|
|
album: {
|
|
id: "0", // type<uint64>
|
|
identity: "", // type<string>
|
|
name: "", // type<string>, 相册名称
|
|
description: "", // type<string>, 相册描述
|
|
cover_photo: "", // type<string>, 封面照片URL
|
|
is_private: false, // type<bool>, 是否私有
|
|
created_at: "", // type<string>
|
|
updated_at: "", // type<string>
|
|
// 关联关系
|
|
photos: [{}], // list<CloudPhotoItem>, 相册下的照片
|
|
}, // type<CloudAlbumItem>
|
|
}
|
|
```
|
|
## /cloud.Album/UpdatePhoto
|
|
|
|
更新照片
|
|
|
|
|
|
### Request
|
|
```javascript
|
|
{
|
|
id: "0", // type<uint64>
|
|
identity: "", // type<string>
|
|
album_id: "0", // type<uint64>, 专辑ID
|
|
title: "", // type<string>, 照片标题
|
|
description: "", // type<string>, 照片描述
|
|
file_path: "", // type<string>, 文件路径
|
|
file_size: "0", // type<int64>, 文件大小
|
|
mime_type: "", // type<string>, 文件类型
|
|
width: 0, // type<int32>, 图片宽度
|
|
height: 0, // type<int32>, 图片高度
|
|
taken_at: "", // type<string>, 拍摄时间
|
|
location: "", // type<string>, 拍摄地点
|
|
tags: "", // type<string>, 标签,逗号分隔
|
|
created_at: "", // type<string>
|
|
updated_at: "", // type<string>
|
|
// 关联关系
|
|
album: {
|
|
id: "0", // type<uint64>
|
|
identity: "", // type<string>
|
|
name: "", // type<string>, 相册名称
|
|
description: "", // type<string>, 相册描述
|
|
cover_photo: "", // type<string>, 封面照片URL
|
|
is_private: false, // type<bool>, 是否私有
|
|
created_at: "", // type<string>
|
|
updated_at: "", // type<string>
|
|
// 关联关系
|
|
photos: [{}], // list<CloudPhotoItem>, 相册下的照片
|
|
}, // type<CloudAlbumItem>
|
|
}
|
|
```
|
|
|
|
### Reply
|
|
```javascript
|
|
{
|
|
code: 0, // type<int32>, 状态码
|
|
message: "", // type<string>, 状态说明
|
|
details: "", // type<string>, 数据
|
|
timeseq: "0", // type<int64>, 响应时间序列
|
|
}
|
|
```
|
|
## /cloud.Album/DeletePhoto
|
|
|
|
删除照片
|
|
|
|
|
|
### Request
|
|
```javascript
|
|
{
|
|
id: "0", // type<int64>, 唯一ID
|
|
identity: "", // type<string>, 唯一码
|
|
}
|
|
```
|
|
|
|
### Reply
|
|
```javascript
|
|
{
|
|
code: 0, // type<int32>, 状态码
|
|
message: "", // type<string>, 状态说明
|
|
details: "", // type<string>, 数据
|
|
timeseq: "0", // type<int64>, 响应时间序列
|
|
}
|
|
```
|
|
## /cloud.Album/ListPhotos
|
|
|
|
获取照片列表
|
|
|
|
|
|
### Request
|
|
```javascript
|
|
{
|
|
page_no: "0", // type<int64>, 页数
|
|
page_size: "0", // type<int64>, 每页记录数
|
|
params: {
|
|
"": ""
|
|
}, // map<string,string>, 条件参数,key=val,eg key:category_id=?,vlaue=11
|
|
}
|
|
```
|
|
|
|
### Reply
|
|
```javascript
|
|
{
|
|
photos: [{
|
|
id: "0", // type<uint64>
|
|
identity: "", // type<string>
|
|
album_id: "0", // type<uint64>, 专辑ID
|
|
title: "", // type<string>, 照片标题
|
|
description: "", // type<string>, 照片描述
|
|
file_path: "", // type<string>, 文件路径
|
|
file_size: "0", // type<int64>, 文件大小
|
|
mime_type: "", // type<string>, 文件类型
|
|
width: 0, // type<int32>, 图片宽度
|
|
height: 0, // type<int32>, 图片高度
|
|
taken_at: "", // type<string>, 拍摄时间
|
|
location: "", // type<string>, 拍摄地点
|
|
tags: "", // type<string>, 标签,逗号分隔
|
|
created_at: "", // type<string>
|
|
updated_at: "", // type<string>
|
|
// 关联关系
|
|
album: {
|
|
id: "0", // type<uint64>
|
|
identity: "", // type<string>
|
|
name: "", // type<string>, 相册名称
|
|
description: "", // type<string>, 相册描述
|
|
cover_photo: "", // type<string>, 封面照片URL
|
|
is_private: false, // type<bool>, 是否私有
|
|
created_at: "", // type<string>
|
|
updated_at: "", // type<string>
|
|
// 关联关系
|
|
photos: [{}], // list<CloudPhotoItem>, 相册下的照片
|
|
}, // type<CloudAlbumItem>
|
|
}], // list<CloudPhotoItem>
|
|
total: "0", // type<int64>
|
|
}
|
|
```
|
|
## /cloud.Album/MovePhoto
|
|
|
|
移动照片到其他相册
|
|
|
|
|
|
### Request
|
|
```javascript
|
|
{
|
|
photo_id: "0", // type<uint64>
|
|
new_album_id: "0", // type<uint64>
|
|
}
|
|
```
|
|
|
|
### Reply
|
|
```javascript
|
|
{
|
|
code: 0, // type<int32>, 状态码
|
|
message: "", // type<string>, 状态说明
|
|
details: "", // type<string>, 数据
|
|
timeseq: "0", // type<int64>, 响应时间序列
|
|
}
|
|
```
|
|
|