kickerde_api_client.provider

Abstract HTTP response provider for testability.

Classes

ResponseProvider

Abstract HTTP response provider for testability.

DefaultResponseProvider

The default provider, which issues actual HTTP requests.

Module Contents

class kickerde_api_client.provider.ResponseProvider

Bases: abc.ABC

Abstract HTTP response provider for testability.

abstract get(path)
Async:

Parameters:

path (str) –

Return type:

str

Returns an HTTP response as a string.

Parameters:

path (str) – Relative path to the endpoint

Returns:

HTTP response payload

Return type:

str

class kickerde_api_client.provider.DefaultResponseProvider(http_client=None, base_url=DEFAULT_ENDPOINT_URL)

Bases: ResponseProvider

The default provider, which issues actual HTTP requests.

Parameters:
  • http_client (httpx.AsyncClient | None) – An optional HTTP client to re-use. The default value is None, which means that an internal HTTP client will be used.

  • base_url (str) – The Kicker API endpoint to connect to. The default value is the public production endpoint.

async get(path)

Returns an HTTP response as a string.

Parameters:

path (str) – Relative path to the endpoint

Returns:

HTTP response payload

Return type:

str