Add CHANGELOG.md documenting all implemented features: - Client with functional options pattern - Authentication with 2FA and auto token renewal - HTTP request helper with retry logic - Data models (Checklist, Task, Note, User, DueDate) - Error handling with sentinel errors - Mage build targets - Comprehensive unit test suite Follows Keep a Changelog 1.1.0 and Semantic Versioning. Closes checkvist-api-93m
2 KiB
2 KiB
Changelog
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
[Unreleased]
Added
-
Client: Core API client with functional options pattern
NewClient(username, remoteKey, ...Option)constructorWithHTTPClient,WithTimeout,WithRetryConfig,WithLogger,WithBaseURLoptions- Thread-safe token management with automatic renewal
-
Authentication: Full authentication support
Authenticate(ctx)for explicit loginAuthenticateWith2FA(ctx, token)for 2FA support- Automatic token refresh before expiry
- Token sent via
X-Client-Tokenheader
-
HTTP Request Helper: Internal request handling with retry logic
- Exponential backoff for HTTP 429 (rate limiting) and 5xx errors
- Configurable retry settings via
RetryConfig - Context cancellation support
- Debug logging via
slog
-
Data Models: Type-safe structs for Checkvist entities
Checklistwith ID, Name, Public, Archived, TaskCount, etc.Taskwith Content, Status, Priority, DueDate, Tags, ChildrenNotefor task commentsUserfor user informationTaskStatusenum (Open, Closed, Invalidated)DueDatewith smart syntax support (DueToday,DueTomorrow,DueAt,DueInDays)
-
Error Handling: Structured error types
APIErrorwith StatusCode, Message, RequestID- Sentinel errors:
ErrUnauthorized,ErrNotFound,ErrRateLimited,ErrBadRequest,ErrServerError - Compatible with
errors.Is()anderrors.As()
-
Build Automation: Mage build targets
mage test- run testsmage coverage- run tests with coveragemage lint- run staticcheckmage fmt- format codemage check- run all quality checks
-
Tests: Comprehensive unit test suite
- Client configuration tests
- Authentication flow tests
- Retry logic tests
- httptest.Server-based mocking