valo_api_official.utils package

Submodules

valo_api_official.utils.fetch_endpoint module

Functions:

encode_params(**kwargs)

Returns a string of the parameters to be used in a URL.

fetch_endpoint(url[, query_args, method])

Fetches an endpoint from the API.

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.

fetch_endpoint(url, query_args=None, method='GET', **kwargs)

Fetches an endpoint from the API.

Parameters:
  • url (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.

Module contents