refactor(session): expose public transport property on LibroFmSession

Add @property transport getter that returns the underlying httpx
transport, replacing the single call site in downloader.py that
reached through session._client._transport. Encapsulates private
attribute access behind a public interface. 2 new tests.

Closes #38
This commit is contained in:
AlexKucera committed 2026-06-05 18:36:03 +02:00
1 parent de4c08cfd0
commit caca930c7c
5 files changed
+217 -3

No files matched your search

+5
View File
@@ -55,6 +55,11 @@ class LibroFmSession:
transport=transport,
)
@property
def transport(self) -> httpx.BaseTransport:
"""Return the underlying httpx transport for streaming downloads."""
return self._client._transport
def authenticate(self) -> str:
"""OAuth2 password grant → returns access_token.