Skip to main content

Create Video Clip

Description​

Creates video clip via the web service.

Function Signature:​

def create_video_clip(ws_config: WebServiceConfig, device_serial: str, create_video_clip: CreateVideoClip) -> VideoClipResult:

Parameters​

  • ws_config (WebServiceConfig): Configuration for the web service connection.
  • device_serial (str): Device serial number.
  • create_video_clip (CreateVideoClip): Input value for create_video_clip.

Returns​

  • VideoClipResult: A result object containing:
    • code: HTTP status code (200 for success, -1 for exceptions).
    • description: Response body or error message.
    • video_clip: 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"
create_video_clip = None
result = create_video_clip(ws_config, device_serial, create_video_clip)
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 -1 and include an error message when implemented.