Commit graph

3 commits

Author SHA1 Message Date
c95825dc88 Fix Notes API parameter format for Create and Update
The Checkvist API expects nested JSON parameters in the format
{"comment": {"comment": "text"}} but the code was sending flat
{"comment": "text"}, causing 400 Bad Request errors.

Changes:
- Add noteCommentWrapper struct for nested JSON format
- Update createNoteRequest and updateNoteRequest to use wrapper
- Update Create and Update methods to use nested structure
- Update tests to verify nested format

Fixes: checkvist-api-awg
2026-01-14 18:18:31 +01:00
5f71f40077 Implement Note operations
Add notes.go with NoteService for task comment CRUD:
- client.Notes(checklistID, taskID) returns NoteService
- List(ctx) - get all notes on a task (GET /comments.json)
- Create(ctx, comment) - add new note (POST /comments.json)
- Update(ctx, noteID, comment) - update note text (PUT /comments/{id}.json)
- Delete(ctx, noteID) - remove note (DELETE /comments/{id}.json)

All methods support context for cancellation and timeouts.

Closes checkvist-api-5ab
2026-01-14 13:40:37 +01:00
3b076836d3 Initial commit 2026-01-14 12:42:00 +01:00