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)
Returns a string of the parameters to be used in a URL.
- Parameters:
**kwargs – Any additional arguments to pass to the endpoint.
- Return type:
Dict
[str
,str
]- Returns:
A dictionary of the parameters to be used in a URL.
- response_type(api_type)
- fetch_endpoint(endpoint_definition, query_args=None, method='GET', **kwargs)
Fetches an endpoint from the API.
- Parameters:
endpoint_definition (
str
) – The endpoint definition to use.query_args (
Optional
[Dict
[str
,Any
]]) – Any additional arguments to pass to the endpoint.method (
str
) – The method to use when fetching the endpoint.**kwargs – Any additional arguments to pass to the endpoint.
- Return type:
Response
- Returns:
A response from the API.
- async fetch_endpoint_async(endpoint_definition, query_args=None, method='GET', **kwargs)
Fetches an endpoint from the API asynchronously.
- Parameters:
endpoint_definition (
str
) – The endpoint definition to use.query_args (
Optional
[Dict
[str
,Any
]]) – Any additional arguments to pass to the endpoint.method (
str
) – The method to use when fetching the endpoint.**kwargs – Any additional arguments to pass to the endpoint.
- Returns:
A response from the API.