Skip to main content

概述

Following 模块提供关注组的管理功能,包括创建、查询、更新和删除关注组,以及管理组内的关注项。

createFollowGroup()

创建一个新的关注组。
string
组名称
Array<{ follow_type: 'company' | 'channel'; follow_value: string }>
关注项列表,每个元素包含 follow_type(string)和 follow_value(string)
Promise<{ group_id: string; name: string; count: number }>
包含 group_id, name, count 的对象
API 路径POST /v1/following/groups

getFollowGroups()

获取当前用户的所有关注组。
Promise<Array<{ group_id: string; name: string; count: number }>>
关注组列表
API 路径GET /v1/following/groups

getFollowGroup()

根据 ID 获取一个关注组的详细信息。
string
关注组 ID
Promise<{ group_id: string; name: string; count: number; follow_values?: Array<{ follow_type: string; follow_value: string }> }>
包含 group_id, name, count, follow_values 的对象
API 路径GET /v1/following/groups/{group_id}

updateFollowGroup()

更新一个关注组的名称。
string
关注组 ID
string
新的组名称
Promise<{ group_id: string; name: string; count: number }>
包含 group_id, name, count 的对象
API 路径POST /v1/following/groups/{group_id}

deleteFollowGroup()

删除一个关注组。
string
关注组 ID
Promise<void>
无返回值
API 路径DELETE /v1/following/groups/{group_id}

addFollowsToGroup()

向关注组添加关注项。
string
关注组 ID
Array<{ follow_type: 'company' | 'channel'; follow_value: string }>
要添加的关注项列表
Promise<void>
无返回值
API 路径POST /v1/following/groups/{group_id}/follows

removeFollowsFromGroup()

从关注组中移除关注项。
string
关注组 ID
string[]
要删除的关注值列表(如股票代码、频道 ID)
Promise<void>
无返回值
API 路径DELETE /v1/following/groups/{group_id}/follows

setGroupFollows()

设置关注组的关注项(替换所有现有关注项)。
string
关注组 ID
Array<{ follow_type: 'company' | 'channel'; follow_value: string }>
新的关注项列表
Promise<void>
无返回值
API 路径PUT /v1/following/groups/{group_id}/follows

getFollowGroupDocs()

获取关注组的文档列表。
string
关注组 ID
number
页码,默认值为 1
number
每页条目数,默认值为 10
Promise<{ items: any[]; total_count: number; page_num: number; page_size: number }>
包含 items, total_count, page_num, page_size 的对象
API 路径GET /v1/following/groups/{group_id}/docs