(
self,
*,
app_id: str,
admin_token: str | None,
api_uri: str = DEFAULT_API_URI,
impersonation: dict[str, str] | None = None,
transport: httpx.AsyncBaseTransport | None = None,
shared_client: httpx.AsyncClient | None = None,
)
| 24 | |
| 25 | class _AsyncHTTP: |
| 26 | def __init__( |
| 27 | self, |
| 28 | *, |
| 29 | app_id: str, |
| 30 | admin_token: str | None, |
| 31 | api_uri: str = DEFAULT_API_URI, |
| 32 | impersonation: dict[str, str] | None = None, |
| 33 | transport: httpx.AsyncBaseTransport | None = None, |
| 34 | shared_client: httpx.AsyncClient | None = None, |
| 35 | ) -> None: |
| 36 | self._app_id = app_id |
| 37 | self._admin_token = admin_token |
| 38 | self._api_uri = api_uri.rstrip("/") |
| 39 | self._impersonation = impersonation or {} |
| 40 | if shared_client is not None: |
| 41 | self._client = shared_client |
| 42 | self._owns_client = False |
| 43 | else: |
| 44 | self._client = httpx.AsyncClient( |
| 45 | base_url=self._api_uri, |
| 46 | timeout=DEFAULT_TIMEOUT, |
| 47 | transport=transport, |
| 48 | ) |
| 49 | self._owns_client = True |
| 50 | |
| 51 | def _headers( |
| 52 | self, *, unauthenticated: bool = False, admin_only: bool = False |
nothing calls this directly
no outgoing calls
no test coverage detected