309 lines
12 KiB
Markdown
309 lines
12 KiB
Markdown
# Space
|
|
|
|
|
|
- [/cloud.Space/Get](#cloudspaceget)
|
|
- [/cloud.Space/GetByKeyIdentifier](#cloudspacegetbykeyidentifier)
|
|
|
|
## /cloud.Space/Get
|
|
|
|
获取空间数据
|
|
|
|
|
|
### Request
|
|
```javascript
|
|
{}
|
|
```
|
|
|
|
### Reply
|
|
```javascript
|
|
{
|
|
id: "0", // type<uint64>
|
|
identity: "", // type<string>
|
|
total_storage: "0", // type<int64>, 总存储空间
|
|
used_storage: "0", // type<int64>, 已用存储空间
|
|
max_storage: "0", // type<int64>, 最大存储空间
|
|
file_count: 0, // type<int32>, 文件数量
|
|
album_count: 0, // type<int32>, 相册数量
|
|
photo_count: 0, // type<int32>, 照片数量
|
|
note_count: 0, // type<int32>, 笔记数量
|
|
bookmark_count: 0, // type<int32>, 书签数量
|
|
private_count: 0, // type<int32>, 私有数量
|
|
created_at: "", // type<string>
|
|
updated_at: "", // type<string>
|
|
// 关联关系
|
|
cloud_disk_dirs: [{
|
|
id: "0", // type<uint64>
|
|
identity: "", // type<string>
|
|
parent_id: "0", // type<uint64>, 支持嵌套目录
|
|
name: "", // type<string>, 目录名称
|
|
path: "", // type<string>, 完整路径
|
|
created_at: "", // type<string>
|
|
updated_at: "", // type<string>
|
|
// 自关联
|
|
parent: {}, // type<CloudDiskDirItem>, 父级目录
|
|
subdirectories: [{}], // list<CloudDiskDirItem>, 子级目录
|
|
files: [{
|
|
id: "0", // type<uint64>
|
|
identity: "", // type<string>
|
|
directory_id: "0", // type<uint64>, 文件所属目录
|
|
name: "", // type<string>, 文件名
|
|
original_name: "", // type<string>, 原始文件名
|
|
size: "0", // type<int64>, 文件大小 (bytes)
|
|
mime_type: "", // type<string>, 文件类型
|
|
storage_path: "", // type<string>, 实际存储路径
|
|
hash: "", // type<string>, 文件哈希,用于去重
|
|
created_at: "", // type<string>
|
|
updated_at: "", // type<string>
|
|
// 关联关系
|
|
directory: {}, // type<CloudDiskDirItem>, 文件所属目录
|
|
}], // list<CloudDiskFileItem>, 文件
|
|
}], // list<CloudDiskDirItem>, 关联云盘目录
|
|
cloud_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>, 关联相册
|
|
cloud_notes: [{
|
|
id: "0", // type<uint64>
|
|
identity: "", // type<string>
|
|
title: "", // type<string>, 标题
|
|
content: "", // type<string>, 内容
|
|
category: "", // type<string>, 分类
|
|
tags: "", // type<string>, 标签,逗号分隔
|
|
is_markdown: false, // type<bool>, 是否是markdown格式
|
|
is_pinned: false, // type<bool>, 是否是置顶
|
|
is_private: false, // type<bool>, 是否是私有
|
|
views: 0, // type<int32>, 浏览次数
|
|
created_at: "", // type<string>
|
|
updated_at: "", // type<string>
|
|
// 关联关系
|
|
attachments: [{
|
|
id: "0", // type<uint64>
|
|
note_id: "0", // type<uint64>, 笔记ID
|
|
file_name: "", // type<string>, 文件名
|
|
file_path: "", // type<string>, 文件路径
|
|
file_size: "0", // type<int64>, 文件大小
|
|
mime_type: "", // type<string>, 文件类型
|
|
created_at: "", // type<string>, 创建时间
|
|
}], // list<NoteAttachmentItem>
|
|
}], // list<CloudNoteItem>, 关联笔记
|
|
cloud_bookmarks: [{
|
|
id: "0", // type<uint64>
|
|
identity: "", // type<string>
|
|
title: "", // type<string>, 标题
|
|
url: "", // type<string>, 网址
|
|
description: "", // type<string>, 描述
|
|
category: "", // type<string>, 分类
|
|
tags: "", // type<string>, 标签
|
|
icon: "", // type<string>, 网站图标URL
|
|
is_private: false, // type<bool>, 是否私有
|
|
created_at: "", // type<string>
|
|
updated_at: "", // type<string>
|
|
}], // list<CloudBookmarkItem>, 关联书签
|
|
cloud_private: [{
|
|
id: "0", // type<uint64>
|
|
identity: "", // type<string>
|
|
data_type: "", // type<string>, 数据类型: password, card, document, etc.
|
|
title: "", // type<string>, 标题
|
|
description: "", // type<string>, 描述
|
|
data: "", // type<string>, 加密存储的实际数据
|
|
is_encrypted: false, // type<bool>, 是否已加密
|
|
tags: "", // type<string>, 标签
|
|
created_at: "", // type<string>
|
|
updated_at: "", // type<string>
|
|
}], // list<CloudPrivateItem>, 关联私有数据
|
|
cloud_shares: [{
|
|
id: "0", // type<uint64>
|
|
identity: "", // type<string>
|
|
share_type: "", // type<string>, file, album, note, etc.
|
|
resource_id: "0", // type<uint64>, 对应资源的ID
|
|
share_token: "", // type<string>, 分享令牌
|
|
password: "", // type<string>, 可选分享密码
|
|
expires_at: "", // type<string>, 过期时间
|
|
view_count: 0, // type<int32>, 浏览次数
|
|
download_count: 0, // type<int32>, 下载次数
|
|
is_public: false, // type<bool>, 是否公开
|
|
created_at: "", // type<string>
|
|
updated_at: "", // type<string>
|
|
}], // list<CloudShareItem>, 关联分享
|
|
}
|
|
```
|
|
## /cloud.Space/GetByKeyIdentifier
|
|
|
|
获取空间数据
|
|
|
|
|
|
### Request
|
|
```javascript
|
|
{
|
|
id: "0", // type<int64>, 唯一ID
|
|
identity: "", // type<string>, 唯一码
|
|
}
|
|
```
|
|
|
|
### Reply
|
|
```javascript
|
|
{
|
|
id: "0", // type<uint64>
|
|
identity: "", // type<string>
|
|
total_storage: "0", // type<int64>, 总存储空间
|
|
used_storage: "0", // type<int64>, 已用存储空间
|
|
max_storage: "0", // type<int64>, 最大存储空间
|
|
file_count: 0, // type<int32>, 文件数量
|
|
album_count: 0, // type<int32>, 相册数量
|
|
photo_count: 0, // type<int32>, 照片数量
|
|
note_count: 0, // type<int32>, 笔记数量
|
|
bookmark_count: 0, // type<int32>, 书签数量
|
|
private_count: 0, // type<int32>, 私有数量
|
|
created_at: "", // type<string>
|
|
updated_at: "", // type<string>
|
|
// 关联关系
|
|
cloud_disk_dirs: [{
|
|
id: "0", // type<uint64>
|
|
identity: "", // type<string>
|
|
parent_id: "0", // type<uint64>, 支持嵌套目录
|
|
name: "", // type<string>, 目录名称
|
|
path: "", // type<string>, 完整路径
|
|
created_at: "", // type<string>
|
|
updated_at: "", // type<string>
|
|
// 自关联
|
|
parent: {}, // type<CloudDiskDirItem>, 父级目录
|
|
subdirectories: [{}], // list<CloudDiskDirItem>, 子级目录
|
|
files: [{
|
|
id: "0", // type<uint64>
|
|
identity: "", // type<string>
|
|
directory_id: "0", // type<uint64>, 文件所属目录
|
|
name: "", // type<string>, 文件名
|
|
original_name: "", // type<string>, 原始文件名
|
|
size: "0", // type<int64>, 文件大小 (bytes)
|
|
mime_type: "", // type<string>, 文件类型
|
|
storage_path: "", // type<string>, 实际存储路径
|
|
hash: "", // type<string>, 文件哈希,用于去重
|
|
created_at: "", // type<string>
|
|
updated_at: "", // type<string>
|
|
// 关联关系
|
|
directory: {}, // type<CloudDiskDirItem>, 文件所属目录
|
|
}], // list<CloudDiskFileItem>, 文件
|
|
}], // list<CloudDiskDirItem>, 关联云盘目录
|
|
cloud_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>, 关联相册
|
|
cloud_notes: [{
|
|
id: "0", // type<uint64>
|
|
identity: "", // type<string>
|
|
title: "", // type<string>, 标题
|
|
content: "", // type<string>, 内容
|
|
category: "", // type<string>, 分类
|
|
tags: "", // type<string>, 标签,逗号分隔
|
|
is_markdown: false, // type<bool>, 是否是markdown格式
|
|
is_pinned: false, // type<bool>, 是否是置顶
|
|
is_private: false, // type<bool>, 是否是私有
|
|
views: 0, // type<int32>, 浏览次数
|
|
created_at: "", // type<string>
|
|
updated_at: "", // type<string>
|
|
// 关联关系
|
|
attachments: [{
|
|
id: "0", // type<uint64>
|
|
note_id: "0", // type<uint64>, 笔记ID
|
|
file_name: "", // type<string>, 文件名
|
|
file_path: "", // type<string>, 文件路径
|
|
file_size: "0", // type<int64>, 文件大小
|
|
mime_type: "", // type<string>, 文件类型
|
|
created_at: "", // type<string>, 创建时间
|
|
}], // list<NoteAttachmentItem>
|
|
}], // list<CloudNoteItem>, 关联笔记
|
|
cloud_bookmarks: [{
|
|
id: "0", // type<uint64>
|
|
identity: "", // type<string>
|
|
title: "", // type<string>, 标题
|
|
url: "", // type<string>, 网址
|
|
description: "", // type<string>, 描述
|
|
category: "", // type<string>, 分类
|
|
tags: "", // type<string>, 标签
|
|
icon: "", // type<string>, 网站图标URL
|
|
is_private: false, // type<bool>, 是否私有
|
|
created_at: "", // type<string>
|
|
updated_at: "", // type<string>
|
|
}], // list<CloudBookmarkItem>, 关联书签
|
|
cloud_private: [{
|
|
id: "0", // type<uint64>
|
|
identity: "", // type<string>
|
|
data_type: "", // type<string>, 数据类型: password, card, document, etc.
|
|
title: "", // type<string>, 标题
|
|
description: "", // type<string>, 描述
|
|
data: "", // type<string>, 加密存储的实际数据
|
|
is_encrypted: false, // type<bool>, 是否已加密
|
|
tags: "", // type<string>, 标签
|
|
created_at: "", // type<string>
|
|
updated_at: "", // type<string>
|
|
}], // list<CloudPrivateItem>, 关联私有数据
|
|
cloud_shares: [{
|
|
id: "0", // type<uint64>
|
|
identity: "", // type<string>
|
|
share_type: "", // type<string>, file, album, note, etc.
|
|
resource_id: "0", // type<uint64>, 对应资源的ID
|
|
share_token: "", // type<string>, 分享令牌
|
|
password: "", // type<string>, 可选分享密码
|
|
expires_at: "", // type<string>, 过期时间
|
|
view_count: 0, // type<int32>, 浏览次数
|
|
download_count: 0, // type<int32>, 下载次数
|
|
is_public: false, // type<bool>, 是否公开
|
|
created_at: "", // type<string>
|
|
updated_at: "", // type<string>
|
|
}], // list<CloudShareItem>, 关联分享
|
|
}
|
|
```
|
|
|