Feature request: endpoints for retrieving note comments and reactions
还没有人认领这个 Issue。
评估
- 难度
- 5/5
- 预计耗时
- 一周以上
- 新手友好度
- 45/100
- Issue 类型
- 功能
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- typescript
- 领域
- api
调研方向
未指定文件或测试。首先查看现有的 @hackmd/api 客户端方法以及相关 issue #428 和 #207;当提议的评论和反应端点、客户端方法及响应类型都已定义并得到支持时,工作即告完成。
由索引模型根据 Issue 内容生成。
描述
Summary
The @hackmd/api client currently has no methods for retrieving comment or reaction data from notes. The only comment-related field exposed is commentPermission (controlling who can comment), but the actual comment content, threads, and reactions are completely inaccessible via the API.
Request
Add API endpoints and corresponding client methods for retrieving comments and reactions:
Proposed endpoints
GET /v1/notes/:noteId/comments
GET /v1/notes/:noteId/reactions
Proposed client methods
// Get all comments on a note (including replies and reactions per comment)
async getComments(noteId: string): Promise<Comment[]>
// Get all reactions on a note
async getReactions(noteId: string): Promise<Reaction[]>
Suggested response types
interface Comment {
id: string
author: {
id: string
name: string
}
body: string
createdAt: string // ISO 8601
updatedAt: string // ISO 8601
resolved: boolean
range?: {
startLine: number
endLine: number
}
replies: Reply[]
reactions: ReactionGroup[]
}
interface Reply {
id: string
author: {
id: string
name: string
}
body: string
createdAt: string
}
interface ReactionGroup {
emoji: string
users: string[] // user IDs
}
interface Reaction {
noteId: string
emoji: string
user: {
id: string
name: string
}
createdAt: string
}
Motivation
HackMD's commenting and reaction features are valuable for collaboration, but teams that use the API or CLI to sync notes to external systems (e.g., GitHub repositories) lose all of this context. Exposing comment and reaction data via the API would enable:
- Backing up discussion context alongside note content
- Building integrations that preserve collaboration history
- Automating workflows that depend on comment/reaction data
Related
- Broader feature request: https://github.com/hackmdio/hackmd-io-issues/issues/428
- Original request from 2020: https://github.com/hackmdio/hackmd-io-issues/issues/207
- 主要语言
- TypeScript
- 星标
- 20
- 派生
- 8
- 平均合并
- 47 分钟
- 30 天内合并 PR
- 5
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
hackmdio/api-client 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 74/100
hackmdio/api-client#73 ·
-
难度 4/5 3-5 天 新手友好度 45/100
hackmdio/api-client#51 ·
-
难度 5/5 一周以上 新手友好度 20/100
hackmdio/api-client#13 · 1 条评论 · 1 个 reaction ·
-
难度 3/5 1-2 天 新手友好度 35/100
hackmdio/api-client#6 · 1 条评论 ·
-
难度 5/5 一周以上 新手友好度 25/100
hackmdio/api-client#2 · 2 条评论 · 1 个 reaction ·
查看 hackmdio/api-client 的全部 Issue
相似的 Issue
-
Release utils decode git output chunk by chunk, so a multi-byte character can turn into U+FFFD可能已有人在做 @goranai 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 74/100
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
vercel-labs/ui#1494 ·
维护者通常 1 天内回复
-
Task retarget keeps the old host in task scope and adds the new host in a form that matches nothing可能已有人在做 @chaitanya0305 今天认领。 未关闭bug P2
难度 2/5 1-3 小时 新手友好度 62/100
BaaRai/ARTEX#652 · 1 条评论 · 1 个 reaction ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 62/100
compiler-explorer/compiler-explorer#9710 ·
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 72/100
维护者通常 1 天内回复