feat: 添加小红书标签功能支持 (#65)
* feat: 实现小红书标签输入和自动关联功能 - 在 PublishImageContent 结构体中添加 Tags 字段 - 实现 inputTags 函数处理多个标签输入 - 实现 inputTag 函数自动点击标签联想下拉框 - 通过 #creator-editor-topic-container 选择器定位标签下拉框 - 自动点击第一个 .item 元素完成标签关联 - 添加错误处理和日志记录 * feat: 为 MCP 和 HTTP API 添加标签(tags)支持 - 在 PublishRequest 结构体中添加 Tags 字段 - 更新 MCP handler 处理标签参数 - 更新 MCP 工具定义,添加 tags 参数说明 - HTTP API 自动支持 tags 字段(通过 PublishRequest) - 保持向后兼容,tags 为可选参数
This commit is contained in:
@@ -24,6 +24,7 @@ type PublishRequest struct {
|
||||
Title string `json:"title" binding:"required"`
|
||||
Content string `json:"content" binding:"required"`
|
||||
Images []string `json:"images" binding:"required,min=1"`
|
||||
Tags []string `json:"tags,omitempty"`
|
||||
}
|
||||
|
||||
// LoginStatusResponse 登录状态响应
|
||||
@@ -89,6 +90,7 @@ func (s *XiaohongshuService) PublishContent(ctx context.Context, req *PublishReq
|
||||
content := xiaohongshu.PublishImageContent{
|
||||
Title: req.Title,
|
||||
Content: req.Content,
|
||||
Tags: req.Tags,
|
||||
ImagePaths: imagePaths,
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user