Skip to main content

Concatenate Clips

Description

Concatenates clips via the web service.

Function Signature:

def concatenate_clips(ws_config: WebServiceConfig, device_id: int, device_name: str, start_epoch: int, end_epoch: int, upload_url: str, postback_url: str, use_vrs: bool = False, timeout: int = 0) -> EventResult:

Parameters

  • ws_config (WebServiceConfig): Configuration for the web service connection.
  • device_id (int): Device identifier.
  • device_name (str): Device name or serial number.
  • start_epoch (int): Input value for start_epoch.
  • end_epoch (int): Input value for end_epoch.
  • upload_url (str): Input value for upload_url.
  • postback_url (str): Input value for postback_url.
  • use_vrs (bool): Input value for use_vrs.
  • timeout (int): Request timeout in seconds.

Returns

  • EventResult: A result object containing:
    • code: HTTP status code (200 for success, -1 for exceptions).
    • description: Response body or error message.
    • event: 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
device_name = "example"
start_epoch = 1
end_epoch = 1
upload_url = "example"
postback_url = "example"
use_vrs = False
timeout = 1
result = concatenate_clips(ws_config, device_id, device_name, start_epoch, end_epoch, upload_url, postback_url, use_vrs, timeout)
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.