Commit Graph
1 Commits
Author SHA1 Message Date
AlexKucera 006a7561ce refactor(session): rename LibroFmClient → LibroFmSession
Relocate API client from client.py to session.py with constructor
injection. Transport is now passed once at construction time
instead of per-method, eliminating 5 redundant httpx.Client
creations per session lifecycle.

- New session.py: LibroFmSession with shared _client, transport
  injected at construction, auth headers set once after
  authenticate()
- Old client.py: deprecated re-export shim (LibroFmClient alias)
- All endpoint signatures slimmed to ≤3 params (removed
  transport= from authenticate/fetch_library/fetch_m4b_url/
  fetch_download_manifest/fetch_pdf_extra_url)
- Updated all source imports (cli.py, downloader.py) and test
  files (test_client, test_downloader, test_cli, test_progress)
- 17 new TDD tests in test_session.py

Closes #27
2026-06-04 15:27:11 +02:00