From e60395c8eeaebd363d5cc90be57861b8d51e6f1b Mon Sep 17 00:00:00 2001 From: olivierapivideo Date: Tue, 8 Oct 2024 10:16:32 +0000 Subject: [PATCH] Add transcript feature --- .../oas_apivideo.yaml-defaut-cli.sha256 | 2 +- CHANGELOG.md | 3 +++ docs/Video.md | 2 ++ docs/VideoCreationPayload.md | 2 ++ docs/VideoUpdatePayload.md | 2 ++ src/Api/VideosApi.cs | 12 ++++++------ src/ApiVideo.csproj | 2 +- src/Client/ApiClient.cs | 2 +- src/Model/Video.cs | 16 ++++++++++++++++ src/Model/VideoCreationPayload.cs | 16 ++++++++++++++++ src/Model/VideoUpdatePayload.cs | 16 ++++++++++++++++ .../payloads/videos/create/responses/201.json | 2 ++ .../create/responses/{400.json => 400-0.json} | 0 .../payloads/videos/create/responses/400-1.json | 7 +++++++ .../payloads/videos/create/responses/400-2.json | 7 +++++++ .../payloads/videos/get/responses/200.json | 2 ++ .../payloads/videos/list/responses/200.json | 6 ++++++ .../payloads/videos/update/responses/200.json | 2 ++ .../update/responses/{400.json => 400-0.json} | 0 .../payloads/videos/update/responses/400-1.json | 7 +++++++ .../payloads/videos/update/responses/400-2.json | 7 +++++++ .../uploadWithUploadToken/responses/201.json | 1 + 22 files changed, 107 insertions(+), 9 deletions(-) rename tests/resources/payloads/videos/create/responses/{400.json => 400-0.json} (100%) create mode 100644 tests/resources/payloads/videos/create/responses/400-1.json create mode 100644 tests/resources/payloads/videos/create/responses/400-2.json rename tests/resources/payloads/videos/update/responses/{400.json => 400-0.json} (100%) create mode 100644 tests/resources/payloads/videos/update/responses/400-1.json create mode 100644 tests/resources/payloads/videos/update/responses/400-2.json diff --git a/.openapi-generator/oas_apivideo.yaml-defaut-cli.sha256 b/.openapi-generator/oas_apivideo.yaml-defaut-cli.sha256 index 0b1c058..33be381 100644 --- a/.openapi-generator/oas_apivideo.yaml-defaut-cli.sha256 +++ b/.openapi-generator/oas_apivideo.yaml-defaut-cli.sha256 @@ -1 +1 @@ -49fece4f39cb92341dc77e0eb7371a152903bf6aebcfa250d289efc9018b0f72 \ No newline at end of file +89e46e80ced45a858d27653ed3fea2a27e486116fca3e94367027fdb92105246 \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 0a1d7f8..01df790 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,9 @@ # Changelog All changes to this project will be documented in this file. +## [1.6.4] - 2024-10-08 +- Add transcript feature + ## [1.6.3] - 2024-09-30 - Add /tags API endpoint diff --git a/docs/Video.md b/docs/Video.md index 7c1638e..b83de60 100644 --- a/docs/Video.md +++ b/docs/Video.md @@ -13,6 +13,8 @@ Name | Type | Description | Notes **DiscardedAt** | **DateTime?** | The date and time the video was discarded. The API populates this field only if you have the Video Restore feature enabled and discard a video. Date and time are provided using ATOM UTC format. | [optional] **DeletesAt** | **DateTime?** | The date and time the video will be permanently deleted. The API populates this field only if you have the Video Restore feature enabled and discard a video. Discarded videos are pemanently deleted after 90 days. Date and time are provided using ATOM UTC format. | [optional] **Discarded** | **bool** | Returns `true` for videos you discarded when you have the Video Restore feature enabled. Returns `false` for every other video. | [optional] +**Language** | **string** | Returns the language of a video in [IETF language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format. You can set the language during video creation via the API, otherwise it is detected automatically. | [optional] +**LanguageOrigin** | **string** | Returns the origin of the last update on the video's `language` attribute. - `api` means that the last update was requested from the API. - `auto` means that the last update was done automatically by the API. | [optional] **Tags** | **List<string>** | One array of tags (each tag is a string) in order to categorize a video. Tags may include spaces. | [optional] **Metadata** | [**List<Metadata>**](Metadata.md) | Metadata you can use to categorise and filter videos. Metadata is a list of dictionaries, where each dictionary represents a key value pair for categorising a video. | [optional] **Source** | [**VideoSource**](VideoSource.md) | | [optional] diff --git a/docs/VideoCreationPayload.md b/docs/VideoCreationPayload.md index 5495133..88cc92e 100644 --- a/docs/VideoCreationPayload.md +++ b/docs/VideoCreationPayload.md @@ -15,6 +15,8 @@ Name | Type | Description | Notes **Metadata** | [**List<Metadata>**](Metadata.md) | A list of key value pairs that you use to provide metadata for your video. | [optional] **Clip** | [**VideoClip**](VideoClip.md) | | [optional] **Watermark** | [**VideoWatermark**](VideoWatermark.md) | | [optional] +**Language** | **string** | Use this parameter to set the language of the video. When this parameter is set, the API creates a transcript of the video using the language you specify. You must use the [IETF language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format. `language` is a permanent attribute of the video. You can update it to another language using the [`PATCH /videos/{videoId}`](https://docs.api.video/reference/api/Videos#update-a-video-object) operation. This triggers the API to generate a new transcript using a different language. | [optional] +**Transcript** | **bool** | Use this parameter to enable transcription. - When `true`, the API generates a transcript for the video. - The default value is `false`. - If you define a video language using the `language` parameter, the API uses that language to transcribe the video. If you do not define a language, the API detects it based on the video. - When the API generates a transcript, it will be available as a caption for the video. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/VideoUpdatePayload.md b/docs/VideoUpdatePayload.md index 70d0880..be4b7fb 100644 --- a/docs/VideoUpdatePayload.md +++ b/docs/VideoUpdatePayload.md @@ -12,6 +12,8 @@ Name | Type | Description | Notes **Mp4Support** | **bool** | Whether the player supports the mp4 format. | [optional] **Tags** | **List<string>** | A list of terms or words you want to tag the video with. Make sure the list includes all the tags you want as whatever you send in this list will overwrite the existing list for the video. | [optional] **Metadata** | [**List<Metadata>**](Metadata.md) | A list (array) of dictionaries where each dictionary contains a key value pair that describes the video. As with tags, you must send the complete list of metadata you want as whatever you send here will overwrite the existing metadata for the video. | [optional] +**Language** | **string** | Use this parameter to set the language of the video. When this parameter is set, the API creates a transcript of the video using the language you specify. You must use the [IETF language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format. `language` is a permanent attribute of the video. You can update it to another language using the [`PATCH /videos/{videoId}`](https://docs.api.video/reference/api/Videos#update-a-video-object) operation. This triggers the API to generate a new transcript using a different language. | [optional] +**Transcript** | **bool** | Use this parameter to enable transcription. - When `true`, the API generates a transcript for the video. - The default value is `false`. - If you define a video language using the `language` parameter, the API uses that language to transcribe the video. If you do not define a language, the API detects it based on the video. - When the API generates a transcript, it will be available as a caption for the video. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/src/Api/VideosApi.cs b/src/Api/VideosApi.cs index 9fa0ff5..a5a2b25 100644 --- a/src/Api/VideosApi.cs +++ b/src/Api/VideosApi.cs @@ -85,7 +85,7 @@ public Task> createWithHttpInfoAsync(VideoCreationPayload vid if (videoCreationPayload != null && videoCreationPayload.title == null) { throw new ApiException(400,"Missing required parameter 'videoCreationPayload.Title' when calling VideosApi->create"); } - + // verify the required parameter 'videoCreationPayload' is set if (videoCreationPayload == null) throw new ApiException(400, "Missing required parameter 'videoCreationPayload' when calling VideosApi->create"); @@ -157,7 +157,7 @@ public ApiResponse