feat: implement TorrentClaw Go API client v0.1.0
Some checks failed
CI / Test (push) Failing after 1s
CI / Test-1 (push) Failing after 1s
CI / Test-2 (push) Failing after 1s
CI / Lint (push) Failing after 1s
CI / Vet (push) Failing after 1s

This commit is contained in:
Deivid Soto 2026-03-28 11:28:48 +01:00
commit f6f24c2c3f
39 changed files with 5067 additions and 0 deletions

29
CHANGELOG.md Normal file
View file

@ -0,0 +1,29 @@
# Changelog
All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [0.1.0] - 2025-01-15
### Added
- Initial release of the TorrentClaw Go client library.
- `Search` — full-text search with advanced filtering (type, genre, year, quality, language, audio, HDR, sort, pagination, country, locale, availability).
- `Autocomplete` — title suggestions for search-as-you-type.
- `Popular` — trending content by community engagement.
- `Recent` — recently added movies and TV shows.
- `WatchProviders` — streaming availability (flatrate, rent, buy, free) with VPN suggestions.
- `Credits` — director and top cast members.
- `Stats` — aggregator statistics (content counts, torrent counts, ingestion history).
- `GetTorrentFile` — download raw `.torrent` file bytes.
- `TorrentDownloadURL` — construct download URL without making an HTTP call.
- Functional options pattern for client configuration (`WithAPIKey`, `WithBaseURL`, `WithTimeout`, `WithRetry`, `WithHTTPClient`, `WithUserAgent`).
- Exponential backoff retry for transient errors (429, 5xx).
- Custom `APIError` type with helper methods (`IsRetryable`, `IsRateLimited`, `IsNotFound`).
- Context support on all methods.
- Zero external dependencies (stdlib only).
- Comprehensive test suite with `httptest`.
- Example tests for godoc.
- CI workflow with GitHub Actions.