179 lines
4.0 KiB
Markdown
179 lines
4.0 KiB
Markdown
# Bookmark
|
|
|
|
书签服务
|
|
|
|
- [/cloud.Bookmark/CreateBookmark](#cloudbookmarkcreatebookmark)
|
|
- [/cloud.Bookmark/GetBookmark](#cloudbookmarkgetbookmark)
|
|
- [/cloud.Bookmark/UpdateBookmark](#cloudbookmarkupdatebookmark)
|
|
- [/cloud.Bookmark/DeleteBookmark](#cloudbookmarkdeletebookmark)
|
|
- [/cloud.Bookmark/ListBookmarks](#cloudbookmarklistbookmarks)
|
|
- [/cloud.Bookmark/ImportBookmarks](#cloudbookmarkimportbookmarks)
|
|
|
|
## /cloud.Bookmark/CreateBookmark
|
|
|
|
创建书签
|
|
|
|
|
|
### Request
|
|
```javascript
|
|
{
|
|
cloud_id: "0", // type<uint64>
|
|
cloud_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>, 是否私有
|
|
}
|
|
```
|
|
|
|
### Reply
|
|
```javascript
|
|
{
|
|
code: 0, // type<int32>, 状态码
|
|
message: "", // type<string>, 状态说明
|
|
details: "", // type<string>, 数据
|
|
timeseq: "0", // type<int64>, 响应时间序列
|
|
}
|
|
```
|
|
## /cloud.Bookmark/GetBookmark
|
|
|
|
获取书签详情
|
|
|
|
|
|
### Request
|
|
```javascript
|
|
{
|
|
id: "0", // type<uint64>
|
|
}
|
|
```
|
|
|
|
### Reply
|
|
```javascript
|
|
{
|
|
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>
|
|
}
|
|
```
|
|
## /cloud.Bookmark/UpdateBookmark
|
|
|
|
更新书签
|
|
|
|
|
|
### Request
|
|
```javascript
|
|
{
|
|
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>
|
|
}
|
|
```
|
|
|
|
### Reply
|
|
```javascript
|
|
{
|
|
code: 0, // type<int32>, 状态码
|
|
message: "", // type<string>, 状态说明
|
|
details: "", // type<string>, 数据
|
|
timeseq: "0", // type<int64>, 响应时间序列
|
|
}
|
|
```
|
|
## /cloud.Bookmark/DeleteBookmark
|
|
|
|
删除书签
|
|
|
|
|
|
### Request
|
|
```javascript
|
|
{
|
|
id: "0", // type<uint64>
|
|
}
|
|
```
|
|
|
|
### Reply
|
|
```javascript
|
|
{
|
|
code: 0, // type<int32>, 状态码
|
|
message: "", // type<string>, 状态说明
|
|
details: "", // type<string>, 数据
|
|
timeseq: "0", // type<int64>, 响应时间序列
|
|
}
|
|
```
|
|
## /cloud.Bookmark/ListBookmarks
|
|
|
|
获取书签列表
|
|
|
|
|
|
### 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
|
|
{
|
|
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>
|
|
total: "0", // type<int64>
|
|
}
|
|
```
|
|
## /cloud.Bookmark/ImportBookmarks
|
|
|
|
导入书签
|
|
|
|
|
|
### Request
|
|
```javascript
|
|
{
|
|
data: "", // type<string>, JSON格式的书签数据
|
|
format: "", // type<string>, 导入格式: chrome, firefox, safari, etc.
|
|
}
|
|
```
|
|
|
|
### Reply
|
|
```javascript
|
|
{
|
|
code: 0, // type<int32>, 状态码
|
|
message: "", // type<string>, 状态说明
|
|
details: "", // type<string>, 数据
|
|
timeseq: "0", // type<int64>, 响应时间序列
|
|
}
|
|
```
|
|
|