Get Pending Event List
Description
Gets pending event list via the web service.
Function Signature:
def get_pending_event_list(ws_config: WebServiceConfig, device_serial: str) -> EventWithNamesListResult:
Parameters
- ws_config (WebServiceConfig): Configuration for the web service connection.
- device_serial (str): Device serial number.
Returns
- EventWithNamesListResult: A result object containing:
code: HTTP status code (200 for success,-1for exceptions).description: Response body or error message.event_with_names_list: Parsed response data when available.
Example Usage
# Example usage
ws_config = WebServiceConfig(access_key="key", secret_key="secret", base_url="https://api.example.com/")
device_serial = "example"
result = get_pending_event_list(ws_config, device_serial)
print(result)
Behavior
- Sends a signed request to the web service.
- On success (code 200), response data is parsed into the result object.
- On success, returns the computed value or result object.
Error Handling
- Exceptions set the result code to
-1and include an error message when implemented.