valo_api.utils package
Submodules
valo_api.utils.dict_struct module
Classes:
valo_api.utils.fetch_endpoint module
Functions:
|
|
|
Returns a string of the parameters to be used in a URL. |
|
|
|
Fetches an endpoint from the API. |
|
Fetches an endpoint from the API asynchronously. |
- parse_endpoint(endpoint_definition, **kwargs)
- get_headers()
- encode_params(**kwargs) Dict[str, str]
Returns a string of the parameters to be used in a URL.
- Parameters:
**kwargs – Any additional arguments to pass to the endpoint.
- Returns:
A dictionary of the parameters to be used in a URL.
- response_type(api_type: Type[T])
- fetch_endpoint(endpoint_definition: str, query_args: Dict[str, Any] | None = None, method: str = 'GET', **kwargs) Response
Fetches an endpoint from the API.
- Parameters:
endpoint_definition – The endpoint definition to use.
query_args – Any additional arguments to pass to the endpoint.
method – The method to use when fetching the endpoint.
**kwargs – Any additional arguments to pass to the endpoint.
- Returns:
A response from the API.
- async fetch_endpoint_async(endpoint_definition: str, query_args: Dict[str, Any] | None = None, method: str = 'GET', **kwargs)
Fetches an endpoint from the API asynchronously.
- Parameters:
endpoint_definition – The endpoint definition to use.
query_args – Any additional arguments to pass to the endpoint.
method – The method to use when fetching the endpoint.
**kwargs – Any additional arguments to pass to the endpoint.
- Returns:
A response from the API.