Feature request: endpoints for retrieving note comments and reactions
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 45/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- typescript
- Lĩnh vực
- api
Hướng nghiên cứu
Không có tệp hoặc bài kiểm thử nào được nêu. Hãy bắt đầu bằng việc xem xét các phương thức client hiện có của @hackmd/api và các issue liên quan #428 và #207; công việc hoàn tất khi các endpoint, phương thức client và kiểu phản hồi được đề xuất cho comment và reaction đã được định nghĩa và hỗ trợ.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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
- Ngôn ngữ chính
- TypeScript
- Star
- 20
- Fork
- 8
- Merge trung bình
- 47 phút
- Pull request đã merge (30 ngày)
- 5
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của hackmdio/api-client
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
hackmdio/api-client#73 ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
hackmdio/api-client#51 ·
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 20/100
hackmdio/api-client#13 · 1 bình luận · 1 reaction ·
-
Parse noteId methodĐang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 35/100
hackmdio/api-client#6 · 1 bình luận ·
-
document creation optionsĐang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
hackmdio/api-client#2 · 2 bình luận · 1 reaction ·
Tất cả issue của hackmdio/api-client
Issue tương tự
-
Release utils decode git output chunk by chunk, so a multi-byte character can turn into U+FFFDCó thể đã có người làm @goranai đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
vercel-labs/ui#1494 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Task retarget keeps the old host in task scope and adds the new host in a form that matches nothingCó thể đã có người làm @chaitanya0305 đã nhận hôm nay. Đang mởbug P2
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
BaaRai/ARTEX#652 · 1 bình luận · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
compiler-explorer/compiler-explorer#9710 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày