150 lines
3.4 KiB
Markdown
150 lines
3.4 KiB
Markdown
# Share
|
|
|
|
分享服务
|
|
|
|
- [/cloud.Share/CreateShare](#cloudsharecreateshare)
|
|
- [/cloud.Share/GetShare](#cloudsharegetshare)
|
|
- [/cloud.Share/DeleteShare](#cloudsharedeleteshare)
|
|
- [/cloud.Share/ListShares](#cloudsharelistshares)
|
|
- [/cloud.Share/ValidateSharePassword](#cloudsharevalidatesharepassword)
|
|
|
|
## /cloud.Share/CreateShare
|
|
|
|
创建分享
|
|
|
|
|
|
### Request
|
|
```javascript
|
|
{
|
|
cloud_id: "0", // type<uint64>
|
|
cloud_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>, 过期时间
|
|
is_public: false, // type<bool>, 是否公开
|
|
}
|
|
```
|
|
|
|
### Reply
|
|
```javascript
|
|
{
|
|
code: 0, // type<int32>, 状态码
|
|
message: "", // type<string>, 状态说明
|
|
details: "", // type<string>, 数据
|
|
timeseq: "0", // type<int64>, 响应时间序列
|
|
}
|
|
```
|
|
## /cloud.Share/GetShare
|
|
|
|
获取分享详情
|
|
|
|
|
|
### Request
|
|
```javascript
|
|
{
|
|
id: "0", // type<int64>, 唯一ID
|
|
identity: "", // type<string>, 唯一码
|
|
}
|
|
```
|
|
|
|
### Reply
|
|
```javascript
|
|
{
|
|
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>
|
|
}
|
|
```
|
|
## /cloud.Share/DeleteShare
|
|
|
|
删除分享
|
|
|
|
|
|
### 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.Share/ListShares
|
|
|
|
获取分享列表
|
|
|
|
|
|
### 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
|
|
{
|
|
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>
|
|
total: "0", // type<int64>
|
|
}
|
|
```
|
|
## /cloud.Share/ValidateSharePassword
|
|
|
|
验证分享密码
|
|
|
|
|
|
### Request
|
|
```javascript
|
|
{
|
|
identity: "", // type<string>
|
|
password: "", // type<string>
|
|
}
|
|
```
|
|
|
|
### Reply
|
|
```javascript
|
|
{
|
|
code: 0, // type<int32>, 状态码
|
|
message: "", // type<string>, 状态说明
|
|
details: "", // type<string>, 数据
|
|
timeseq: "0", // type<int64>, 响应时间序列
|
|
}
|
|
```
|
|
|