Create a character from an uploaded video. Args: name: Display name for this API character. video: Video file used to create a character. extra_headers: Send extra headers extra_query: Add additional query parameters to the request
(
self,
*,
name: str,
video: FileTypes,
# 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,
)
| 914 | ) |
| 915 | |
| 916 | async def create_character( |
| 917 | self, |
| 918 | *, |
| 919 | name: str, |
| 920 | video: FileTypes, |
| 921 | # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. |
| 922 | # The extra values given here take precedence over values defined on the client or passed to this method. |
| 923 | extra_headers: Headers | None = None, |
| 924 | extra_query: Query | None = None, |
| 925 | extra_body: Body | None = None, |
| 926 | timeout: float | httpx.Timeout | None | NotGiven = not_given, |
| 927 | ) -> VideoCreateCharacterResponse: |
| 928 | """ |
| 929 | Create a character from an uploaded video. |
| 930 | |
| 931 | Args: |
| 932 | name: Display name for this API character. |
| 933 | |
| 934 | video: Video file used to create a character. |
| 935 | |
| 936 | extra_headers: Send extra headers |
| 937 | |
| 938 | extra_query: Add additional query parameters to the request |
| 939 | |
| 940 | extra_body: Add additional JSON properties to the request |
| 941 | |
| 942 | timeout: Override the client-level default timeout for this request, in seconds |
| 943 | """ |
| 944 | body = deepcopy_with_paths( |
| 945 | { |
| 946 | "name": name, |
| 947 | "video": video, |
| 948 | }, |
| 949 | [["video"]], |
| 950 | ) |
| 951 | files = extract_files(cast(Mapping[str, object], body), paths=[["video"]]) |
| 952 | # It should be noted that the actual Content-Type header that will be |
| 953 | # sent to the server will contain a `boundary` parameter, e.g. |
| 954 | # multipart/form-data; boundary=---abc-- |
| 955 | extra_headers = {"Content-Type": "multipart/form-data", **(extra_headers or {})} |
| 956 | return await self._post( |
| 957 | "/videos/characters", |
| 958 | body=await async_maybe_transform(body, video_create_character_params.VideoCreateCharacterParams), |
| 959 | files=files, |
| 960 | options=make_request_options( |
| 961 | extra_headers=extra_headers, |
| 962 | extra_query=extra_query, |
| 963 | extra_body=extra_body, |
| 964 | timeout=timeout, |
| 965 | security={"bearer_auth": True}, |
| 966 | ), |
| 967 | cast_to=VideoCreateCharacterResponse, |
| 968 | ) |
| 969 | |
| 970 | async def download_content( |
| 971 | self, |
nothing calls this directly
no test coverage detected