Feature request: endpoints for retrieving note comments and reactions
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 45/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Ferma
- Stack tecnologico
- typescript
- Ambito
- api
Direzione di ricerca
Non sono indicati file o test. Inizia esaminando i metodi client esistenti di @hackmd/api e le issue correlate #428 e #207; il lavoro è completo quando gli endpoint, i metodi client e i tipi di risposta proposti per commenti e reazioni sono definiti e supportati.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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
- Lingua principale
- TypeScript
- Stelle
- 20
- Fork
- 8
- Merge medio
- 47m
- PR unite (30g)
- 5
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di hackmdio/api-client
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
hackmdio/api-client#73 ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
hackmdio/api-client#51 ·
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 20/100
hackmdio/api-client#13 · 1 commento · 1 reazione ·
-
Parse noteId methodAperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 35/100
hackmdio/api-client#6 · 1 commento ·
-
document creation optionsAperta
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
hackmdio/api-client#2 · 2 commenti · 1 reazione ·
Tutte le issue di hackmdio/api-client
Issue simili
-
Release utils decode git output chunk by chunk, so a multi-byte character can turn into U+FFFDForse già presa @goranai l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
vercel-labs/ui#1494 ·
I maintainer di solito rispondono entro 1 giorno
-
Task retarget keeps the old host in task scope and adds the new host in a form that matches nothingForse già presa @chaitanya0305 l’ha presa oggi. Apertabug P2
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
BaaRai/ARTEX#652 · 1 commento · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
compiler-explorer/compiler-explorer#9710 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno