Get Video Clip List
Description
Gets video clip list via the web service.
Function Signature:
def get_video_clip_list(ws_config: WebServiceConfig, device_id: int, start_epoch: int, end_epoch: int, count: int = 0, order: str = 'desc', video_clip_type_id: int = 1, tags: list[int] = []) -> VideoClipListResult:
Parameters
- ws_config (WebServiceConfig): Configuration for the web service connection.
- device_id (int): Device identifier.
- start_epoch (int): Input value for
start_epoch. - end_epoch (int): Input value for
end_epoch. - count (int): Input value for
count. - order (str): Input value for
order. - video_clip_type_id (int): Input value for
video_clip_type_id. - tags (list[int]): Input value for
tags.
Returns
- VideoClipListResult: A result object containing:
code: HTTP status code (200 for success,-1for exceptions).description: Response body or error message.video_clip_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_id = 1
start_epoch = 1
end_epoch = 1
count = 1
order = "example"
video_clip_type_id = 1
tags = 1
result = get_video_clip_list(ws_config, device_id, start_epoch, end_epoch, count, order, video_clip_type_id, tags)
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.