Download the generated video bytes or a derived preview asset. Streams the rendered video content for the specified video job. Args: variant: Which downloadable asset to return. Defaults to the MP4 video. extra_headers: Send extra headers ex
(
self,
video_id: str,
*,
variant: Literal["video", "thumbnail", "spritesheet"] | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
)
| 389 | ) |
| 390 | |
| 391 | def download_content( |
| 392 | self, |
| 393 | video_id: str, |
| 394 | *, |
| 395 | variant: Literal["video", "thumbnail", "spritesheet"] | Omit = omit, |
| 396 | # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. |
| 397 | # The extra values given here take precedence over values defined on the client or passed to this method. |
| 398 | extra_headers: Headers | None = None, |
| 399 | extra_query: Query | None = None, |
| 400 | extra_body: Body | None = None, |
| 401 | timeout: float | httpx.Timeout | None | NotGiven = not_given, |
| 402 | ) -> _legacy_response.HttpxBinaryResponseContent: |
| 403 | """ |
| 404 | Download the generated video bytes or a derived preview asset. |
| 405 | |
| 406 | Streams the rendered video content for the specified video job. |
| 407 | |
| 408 | Args: |
| 409 | variant: Which downloadable asset to return. Defaults to the MP4 video. |
| 410 | |
| 411 | extra_headers: Send extra headers |
| 412 | |
| 413 | extra_query: Add additional query parameters to the request |
| 414 | |
| 415 | extra_body: Add additional JSON properties to the request |
| 416 | |
| 417 | timeout: Override the client-level default timeout for this request, in seconds |
| 418 | """ |
| 419 | if not video_id: |
| 420 | raise ValueError(f"Expected a non-empty value for `video_id` but received {video_id!r}") |
| 421 | extra_headers = {"Accept": "application/binary", **(extra_headers or {})} |
| 422 | return self._get( |
| 423 | path_template("/videos/{video_id}/content", video_id=video_id), |
| 424 | options=make_request_options( |
| 425 | extra_headers=extra_headers, |
| 426 | extra_query=extra_query, |
| 427 | extra_body=extra_body, |
| 428 | timeout=timeout, |
| 429 | query=maybe_transform({"variant": variant}, video_download_content_params.VideoDownloadContentParams), |
| 430 | security={"bearer_auth": True}, |
| 431 | ), |
| 432 | cast_to=_legacy_response.HttpxBinaryResponseContent, |
| 433 | ) |
| 434 | |
| 435 | def edit( |
| 436 | self, |