fews_py_wrapper._api.base#

Classes

ApiEndpoint()

Wraps a single API endpoint with parameter handling and validation.

class fews_py_wrapper._api.base.ApiEndpoint[source]#

Wraps a single API endpoint with parameter handling and validation.

execute(*, client, **kwargs)[source]#

Execute the API endpoint call.

Parameters:
  • client (AuthenticatedClient | Client) – AuthenticatedClient or Client instance for API calls.

  • document_format – Format of the returned document.

  • **kwargs (Any) – Keyword arguments for the API call.

Returns:

Parsed JSON response from the API.

Return type:

dict

input_args()[source]#

Get the list of input argument names for the API endpoint.

Returns:

Parameter names accepted by the API endpoint function.

Return type:

list

update_input_kwargs(kwargs)[source]#

Convert and validate kwargs to match API endpoint parameter models.

Converts values to their appropriate enum types and handles boolean conversions as needed.

Parameters:

kwargs (dict[str, Any]) – Dictionary of keyword arguments to update.

Returns:

Updated kwargs with values converted to correct types.

Return type:

dict

Raises:

ValueError – If an argument value is invalid or cannot be converted.