Commit graph

4 commits

Author SHA1 Message Date
e4862b8e9b Fix date parsing for Checkvist API format
Add custom APITime type with UnmarshalJSON to handle the non-standard
date format returned by the Checkvist API ("2026/01/14 16:07:31 +0000")
instead of the expected RFC3339 format.

Changes:
- Add APITime type with custom JSON marshaling/unmarshaling in models.go
- Replace time.Time with APITime for UpdatedAt/CreatedAt fields in
  Checklist, Task, and Note structs
- Add NewAPITime constructor for convenience
- Update test fixtures to use real API date format
- Add comprehensive unit tests for APITime in models_test.go

Fixes: checkvist-api-4qn
2026-01-14 18:10:02 +01:00
fa6b93e564 Add test documenting Checkvist API date format bug 2026-01-14 17:55:57 +01:00
cb30b178be Add Filter builder, Archive/Unarchive, WithRepeat, and GoDoc examples
- Implement client-side Filter builder with tag, status, due date, and search filters
- Add unit tests for Filter with performance benchmark
- Add Archive/Unarchive methods to ChecklistService
- Add WithRepeat method to TaskBuilder for recurring tasks
- Create GoDoc examples for all major functionality
2026-01-14 14:39:27 +01:00
0bb7d2d735 Add unit tests for Checklists
Create checklists_test.go with comprehensive tests:
- TestChecklists_List: list all checklists
- TestChecklists_ListArchived: list with archived filter
- TestChecklists_Get: get single checklist by ID
- TestChecklists_Get_NotFound: handle 404 error
- TestChecklists_Create: create new checklist
- TestChecklists_Update: update checklist name
- TestChecklists_Delete: delete checklist

Add testdata/checklists/ fixtures:
- list.json: sample checklist list
- list_archived.json: archived checklists
- single.json: single checklist response

All 7 tests pass using httptest.Server mocking.

Closes checkvist-api-347
2026-01-14 13:42:05 +01:00