refactor: Private bool → Visibility string 支持多种可见范围 (#464)

* docs: 更新 API 文档以包含 private 参数的用途和可选性。

* refactor: visibility 功能从 Private bool 重构为 Visibility string

将发布时可见范围参数从 `Private bool` 改为 `Visibility string`,
支持三种选项:公开可见(默认)、仅自己可见、仅互关好友可见。

- 使用精确 CSS selector 替代遍历 span/label/div 的宽泛选择器
- 新增参数校验,不支持的选项直接返回错误
- 更新 API 文档和 MCP jsonschema 描述
- 与 upstream IsOriginal(原创声明) 功能共存

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: yryangang <dd101bb@qq.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
zy
2026-02-28 00:37:47 +08:00
committed by GitHub
parent 7d87b9e5ee
commit fcbf554016
6 changed files with 95 additions and 9 deletions

View File

@@ -171,7 +171,8 @@ Content-Type: application/json
"http://example.com/image1.jpg",
"http://example.com/image2.jpg"
],
"tags": ["标签1", "标签2"]
"tags": ["标签1", "标签2"],
"visibility": "公开可见"
}
```
@@ -180,6 +181,7 @@ Content-Type: application/json
- `content` (string, required): 笔记内容
- `images` (array, required): 图片URL数组至少包含一张图片
- `tags` (array, optional): 标签数组
- `visibility` (string, optional): 可见范围,支持: `公开可见`(默认)、`仅自己可见``仅互关好友可见`。不填则默认公开可见
**响应**
```json
@@ -212,7 +214,8 @@ Content-Type: application/json
"title": "视频标题",
"content": "视频内容描述",
"video": "/Users/username/Videos/video.mp4",
"tags": ["标签1", "标签2"]
"tags": ["标签1", "标签2"],
"visibility": "公开可见"
}
```
@@ -221,6 +224,7 @@ Content-Type: application/json
- `content` (string, required): 视频内容描述
- `video` (string, required): 本地视频文件绝对路径
- `tags` (array, optional): 标签数组
- `visibility` (string, optional): 可见范围,支持: `公开可见`(默认)、`仅自己可见``仅互关好友可见`。不填则默认公开可见
**响应**
```json