diff --git a/api/openapi.yaml b/api/openapi.yaml index d430b44..bec843e 100644 --- a/api/openapi.yaml +++ b/api/openapi.yaml @@ -4859,8 +4859,12 @@ paths: schema: type: string style: simple - - description: A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers) - language representation. + - description: |- + A valid language identifier using IETF language tags. You can use primary subtags like `en` (English), extended subtags like `fr-CA` (French, Canada), or region subtags like `zh-Hans-CN` (Simplified Chinese used in the PRC). + + - This parameter **only accepts dashes for separators**, for example `fr-CA`. If you use a different separator in your request, the API returns an error. + - When the value in your request does not match any covered language, the API returns an error. + - This endpoint uses [Symfony](https://symfony.com) to reference the list of supported language tags. You can find the list of supported tags [here](https://github.com/symfony/symfony/blob/6.3/src/Symfony/Component/Intl/Resources/data/locales/meta.php). example: en explode: false in: path @@ -4872,6 +4876,32 @@ paths: responses: "204": description: No Content + "400": + content: + application/json: + examples: + Invalid language formatting: + description: This error occurs when the language tag you provided + contains characters other than letters and dashes. + value: + type: https://docs.api.video/reference/invalid-attribute + title: An attribute is invalid. + status: 400 + detail: The "language" attribute must contain only letters and + dashes (for example "fr", "fr-BE"). + name: language + Invalid language: + description: This error occurs when the language tag you provided + does not match any supported language. + value: + type: https://docs.api.video/reference/invalid-attribute + title: An attribute is invalid. + status: 400 + detail: The "language" attribute is not valid. + name: language + schema: + $ref: '#/components/schemas/bad-request' + description: Bad request error "404": content: application/json: @@ -4896,19 +4926,23 @@ paths: \ := apivideosdk.SandboxClientBuilder(\"YOUR_SANDBOX_API_KEY\").Build()\n\ \ \n videoId := \"vi4k0jvEUuaTdRAEjQ4Prklgc\" // string | The\ \ unique identifier for the video you want to delete a caption from.\n\ - \ language := \"en\" // string | A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers)\ - \ language representation.\n\n \n err := client.Captions.Delete(videoId,\ - \ language)\n\n if err != nil {\n fmt.Fprintf(os.Stderr, \"\ - Error when calling `Captions.Delete``: %v\\\n\", err)\n }\n}\n" + \ language := \"en\" // string | A valid language identifier using\ + \ IETF language tags. You can use primary subtags like `en` (English),\ + \ extended subtags like `fr-CA` (French, Canada), or region subtags like\ + \ `zh-Hans-CN` (Simplified Chinese used in the PRC).\n\n \n err\ + \ := client.Captions.Delete(videoId, language)\n\n if err != nil {\n\ + \ fmt.Fprintf(os.Stderr, \"Error when calling `Captions.Delete``:\ + \ %v\\\n\", err)\n }\n}\n" - language: node code: "// First install the \"@api.video/nodejs-client\" npm package\n//\ \ Documentation: https://github.com/apivideo/api.video-nodejs-client/blob/main/doc/api/CaptionsApi.md#delete\n\ \nconst client = new ApiVideoClient({ apiKey: \"YOUR_API_KEY\" });\n\n\ const videoId = 'vi4k0jvEUuaTdRAEjQ4Prklgc'; // The unique identifier\ \ for the video you want to delete a caption from.\nconst language = 'en';\ - \ // A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers)\ - \ language representation.\n\nawait client.captions.delete(videoId, language);\n\ - \ " + \ // A valid language identifier using IETF language tags. You can use\ + \ primary subtags like `en` (English), extended subtags like `fr-CA` (French,\ + \ Canada), or region subtags like `zh-Hans-CN` (Simplified Chinese used\ + \ in the PRC).\n\nawait client.captions.delete(videoId, language);\n " - language: python code: | # First install the api client with "pip install api.video" @@ -4924,7 +4958,7 @@ paths: # Create an instance of the API class api_instance = captions_api.CaptionsApi(api_client) video_id = "vi4k0jvEUuaTdRAEjQ4Prklgc" # str | The unique identifier for the video you want to delete a caption from. - language = "en" # str | A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers) language representation. + language = "en" # str | A valid language identifier using IETF language tags. You can use primary subtags like `en` (English), extended subtags like `fr-CA` (French, Canada), or region subtags like `zh-Hans-CN` (Simplified Chinese used in the PRC). # example passing only required values which don't have defaults set try: @@ -4944,14 +4978,16 @@ paths: , ApiVideoClient.Environment.SANDBOX);\n\n CaptionsApi apiInstance\ \ = client.captions();\n \n String videoId = \"vi4k0jvEUuaTdRAEjQ4Prklgc\"\ ; // The unique identifier for the video you want to delete a caption\ - \ from.\n String language = \"en\"; // A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers)\ - \ language representation.\n\n try {\n apiInstance.delete(videoId,\ - \ language);\n } catch (ApiException e) {\n System.err.println(\"\ - Exception when calling CaptionsApi#delete\");\n System.err.println(\"\ - Status code: \" + e.getCode());\n System.err.println(\"Reason: \"\ - \ + e.getMessage());\n System.err.println(\"Response headers: \"\ - \ + e.getResponseHeaders());\n e.printStackTrace();\n }\n }\n\ - }\n" + \ from.\n String language = \"en\"; // A valid language identifier\ + \ using IETF language tags. You can use primary subtags like `en` (English),\ + \ extended subtags like `fr-CA` (French, Canada), or region subtags like\ + \ `zh-Hans-CN` (Simplified Chinese used in the PRC).\n\n try {\n \ + \ apiInstance.delete(videoId, language);\n } catch (ApiException\ + \ e) {\n System.err.println(\"Exception when calling CaptionsApi#delete\"\ + );\n System.err.println(\"Status code: \" + e.getCode());\n \ + \ System.err.println(\"Reason: \" + e.getMessage());\n System.err.println(\"\ + Response headers: \" + e.getResponseHeaders());\n e.printStackTrace();\n\ + \ }\n }\n}\n" - language: csharp code: | // First add the "ApiVideo" NuGet package to your project @@ -4972,7 +5008,7 @@ paths: var apiInstance = new ApiVideoClient(apiKey,basePath); var videoId = vi4k0jvEUuaTdRAEjQ4Prklgc; // string | The unique identifier for the video you want to delete a caption from. - var language = en; // string | A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers) language representation. + var language = en; // string | A valid language identifier using IETF language tags. You can use primary subtags like `en` (English), extended subtags like `fr-CA` (French, Canada), or region subtags like `zh-Hans-CN` (Simplified Chinese used in the PRC). var apiCaptionsInstance = apiInstance.Captions(); try { @@ -4993,8 +5029,10 @@ paths: \n// Documentation: https://github.com/apivideo/api.video-php-client/blob/main/docs/Api/CaptionsApi.md#delete\n\ \nrequire __DIR__ . '/vendor/autoload.php';\n\n$videoId = 'vi4k0jvEUuaTdRAEjQ4Prklgc';\ \ // The unique identifier for the video you want to delete a caption\ - \ from.\n$language = 'en'; // A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers)\ - \ language representation.\n\n$client->captions()->delete($videoId, $language); " + \ from.\n$language = 'en'; // A valid language identifier using IETF language\ + \ tags. You can use primary subtags like `en` (English), extended subtags\ + \ like `fr-CA` (French, Canada), or region subtags like `zh-Hans-CN` (Simplified\ + \ Chinese used in the PRC).\n\n$client->captions()->delete($videoId, $language); " - language: swift code: | // First install the api client: https://github.com/apivideo/api.video-swift-client#getting-started @@ -5013,8 +5051,12 @@ paths: schema: type: string style: simple - - description: A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers) - language representation + - description: |- + A valid language identifier using IETF language tags. You can use primary subtags like `en` (English), extended subtags like `fr-CA` (French, Canada), or region subtags like `zh-Hans-CN` (Simplified Chinese used in the PRC). + + - This parameter **only accepts dashes for separators**, for example `fr-CA`. If you use a different separator in your request, the API returns an error. + - When the value in your request does not match any covered language, the API returns an error. + - This endpoint uses [Symfony](https://symfony.com) to reference the list of supported language tags. You can find the list of supported tags [here](https://github.com/symfony/symfony/blob/6.3/src/Symfony/Component/Intl/Resources/data/locales/meta.php). example: en explode: false in: path @@ -5033,10 +5075,37 @@ paths: uri: /videos/vi3N6cDinStg3oBbN79GklWS/captions/en src: https://cdn.api.video/vod/vi3N6cDinStg3oBbN79GklWS/captions/en.vtt srclang: en + languageName: English default: false schema: $ref: '#/components/schemas/caption' description: Success + "400": + content: + application/json: + examples: + Invalid language formatting: + description: This error occurs when the language tag you provided + contains characters other than letters and dashes. + value: + type: https://docs.api.video/reference/invalid-attribute + title: An attribute is invalid. + status: 400 + detail: The "language" attribute must contain only letters and + dashes (for example "fr", "fr-BE"). + name: language + Invalid language: + description: This error occurs when the language tag you provided + does not match any supported language. + value: + type: https://docs.api.video/reference/invalid-attribute + title: An attribute is invalid. + status: 400 + detail: The "language" attribute is not valid. + name: language + schema: + $ref: '#/components/schemas/bad-request' + description: Bad request error "404": content: application/json: @@ -5065,8 +5134,10 @@ paths: \ := apivideosdk.SandboxClientBuilder(\"YOUR_SANDBOX_API_KEY\").Build()\n\ \ \n videoId := \"vi4k0jvEUuaTdRAEjQ4Prklg\" // string | The\ \ unique identifier for the video you want captions for.\n language\ - \ := \"en\" // string | A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers)\ - \ language representation\n\n \n res, err := client.Captions.Get(videoId,\ + \ := \"en\" // string | A valid language identifier using IETF language\ + \ tags. You can use primary subtags like `en` (English), extended subtags\ + \ like `fr-CA` (French, Canada), or region subtags like `zh-Hans-CN` (Simplified\ + \ Chinese used in the PRC).\n\n \n res, err := client.Captions.Get(videoId,\ \ language)\n\n if err != nil {\n fmt.Fprintf(os.Stderr, \"\ Error when calling `Captions.Get``: %v\\\n\", err)\n }\n // response\ \ from `Get`: Caption\n fmt.Fprintf(os.Stdout, \"Response from `Captions.Get`:\ @@ -5079,7 +5150,7 @@ paths: const client = new ApiVideoClient({ apiKey: "YOUR_API_KEY" }); const videoId = 'vi4k0jvEUuaTdRAEjQ4Prklg'; // The unique identifier for the video you want captions for. - const language = 'en'; // A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers) language representation + const language = 'en'; // A valid language identifier using IETF language tags. You can use primary subtags like `en` (English), extended subtags like `fr-CA` (French, Canada), or region subtags like `zh-Hans-CN` (Simplified Chinese used in the PRC). const caption = await client.captions.get(videoId, language); - language: python @@ -5098,7 +5169,7 @@ paths: # Create an instance of the API class api_instance = captions_api.CaptionsApi(api_client) video_id = "vi4k0jvEUuaTdRAEjQ4Prklg" # str | The unique identifier for the video you want captions for. - language = "en" # str | A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers) language representation + language = "en" # str | A valid language identifier using IETF language tags. You can use primary subtags like `en` (English), extended subtags like `fr-CA` (French, Canada), or region subtags like `zh-Hans-CN` (Simplified Chinese used in the PRC). # example passing only required values which don't have defaults set try: @@ -5119,8 +5190,10 @@ paths: , ApiVideoClient.Environment.SANDBOX);\n\n CaptionsApi apiInstance\ \ = client.captions();\n \n String videoId = \"vi4k0jvEUuaTdRAEjQ4Prklg\"\ ; // The unique identifier for the video you want captions for.\n String\ - \ language = \"en\"; // A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers)\ - \ language representation\n\n try {\n Caption result = apiInstance.get(videoId,\ + \ language = \"en\"; // A valid language identifier using IETF language\ + \ tags. You can use primary subtags like `en` (English), extended subtags\ + \ like `fr-CA` (French, Canada), or region subtags like `zh-Hans-CN` (Simplified\ + \ Chinese used in the PRC).\n\n try {\n Caption result = apiInstance.get(videoId,\ \ language);\n System.out.println(result);\n } catch (ApiException\ \ e) {\n System.err.println(\"Exception when calling CaptionsApi#get\"\ );\n System.err.println(\"Status code: \" + e.getCode());\n \ @@ -5147,7 +5220,7 @@ paths: var apiInstance = new ApiVideoClient(apiKey,basePath); var videoId = vi4k0jvEUuaTdRAEjQ4Prklg; // string | The unique identifier for the video you want captions for. - var language = en; // string | A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers) language representation + var language = en; // string | A valid language identifier using IETF language tags. You can use primary subtags like `en` (English), extended subtags like `fr-CA` (French, Canada), or region subtags like `zh-Hans-CN` (Simplified Chinese used in the PRC). var apiCaptionsInstance = apiInstance.Captions(); try { @@ -5169,8 +5242,10 @@ paths: \n// Documentation: https://github.com/apivideo/api.video-php-client/blob/main/docs/Api/CaptionsApi.md#get\n\ \nrequire __DIR__ . '/vendor/autoload.php';\n\n$videoId = 'vi4k0jvEUuaTdRAEjQ4Prklg';\ \ // The unique identifier for the video you want captions for.\n$language\ - \ = 'en'; // A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers)\ - \ language representation\n\n$client->captions()->get($videoId, $language); " + \ = 'en'; // A valid language identifier using IETF language tags. You\ + \ can use primary subtags like `en` (English), extended subtags like `fr-CA`\ + \ (French, Canada), or region subtags like `zh-Hans-CN` (Simplified Chinese\ + \ used in the PRC).\n\n$client->captions()->get($videoId, $language); " - language: swift code: | // First install the api client: https://github.com/apivideo/api.video-swift-client#getting-started @@ -5190,8 +5265,12 @@ paths: schema: type: string style: simple - - description: A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers) - language representation. + - description: |- + A valid language identifier using IETF language tags. You can use primary subtags like `en` (English), extended subtags like `fr-CA` (French, Canada), or region subtags like `zh-Hans-CN` (Simplified Chinese used in the PRC). + + - This parameter **only accepts dashes for separators**, for example `fr-CA`. If you use a different separator in your request, the API returns an error. + - When the value in your request does not match any covered language, the API returns an error. + - This endpoint uses [Symfony](https://symfony.com) to reference the list of supported language tags. You can find the list of supported tags [here](https://github.com/symfony/symfony/blob/6.3/src/Symfony/Component/Intl/Resources/data/locales/meta.php). example: en explode: false in: path @@ -5216,6 +5295,7 @@ paths: uri: /videos/vi3N6cDinStg3oBbN79GklWS/captions/en src: https://cdn.api.video/vod/vi3N6cDinStg3oBbN79GklWS/captions/en.vtt srclang: en + languageName: English default: true schema: $ref: '#/components/schemas/caption' @@ -5224,17 +5304,28 @@ paths: content: application/json: examples: - response: + Invalid language formatting: + description: This error occurs when the language tag you provided + contains characters other than letters and dashes. value: - type: string (required) - title: string (required) - name: string (required) - status: integer (required) - problems: - - null + type: https://docs.api.video/reference/invalid-attribute + title: An attribute is invalid. + status: 400 + detail: The "language" attribute must contain only letters and + dashes (for example "fr", "fr-BE"). + name: language + Invalid language: + description: This error occurs when the language tag you provided + does not match any supported language. + value: + type: https://docs.api.video/reference/invalid-attribute + title: An attribute is invalid. + status: 400 + detail: The "language" attribute is not valid. + name: language schema: $ref: '#/components/schemas/bad-request' - description: Bad Request + description: Bad request error "404": content: application/json: @@ -5269,10 +5360,13 @@ paths: \ := apivideosdk.SandboxClientBuilder(\"YOUR_SANDBOX_API_KEY\").Build()\n\ \ \n videoId := \"vi4k0jvEUuaTdRAEjQ4Prklg\" // string | The\ \ unique identifier for the video you want to have automatic captions\ - \ for.\n language := \"en\" // string | A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers)\ - \ language representation.\n captionsUpdatePayload := *apivideosdk.NewCaptionsUpdatePayload()\ - \ // CaptionsUpdatePayload | \n\n \n res, err := client.Captions.Update(videoId,\ - \ language, captionsUpdatePayload)\n\n if err != nil {\n fmt.Fprintf(os.Stderr,\ + \ for.\n language := \"en\" // string | A valid language identifier\ + \ using IETF language tags. You can use primary subtags like `en` (English),\ + \ extended subtags like `fr-CA` (French, Canada), or region subtags like\ + \ `zh-Hans-CN` (Simplified Chinese used in the PRC).\n captionsUpdatePayload\ + \ := *apivideosdk.NewCaptionsUpdatePayload() // CaptionsUpdatePayload\ + \ | \n\n \n res, err := client.Captions.Update(videoId, language,\ + \ captionsUpdatePayload)\n\n if err != nil {\n fmt.Fprintf(os.Stderr,\ \ \"Error when calling `Captions.Update``: %v\\\n\", err)\n }\n \ \ // response from `Update`: Caption\n fmt.Fprintf(os.Stdout, \"Response\ \ from `Captions.Update`: %v\\\n\", res)\n}\n" @@ -5282,10 +5376,12 @@ paths: \nconst client = new ApiVideoClient({ apiKey: \"YOUR_API_KEY\" });\n\n\ const videoId = 'vi4k0jvEUuaTdRAEjQ4Prklg'; // The unique identifier for\ \ the video you want to have automatic captions for.\nconst language =\ - \ 'en'; // A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers)\ - \ language representation.\nconst captionsUpdatePayload = {\n _default:\ - \ true,\n}; \n \nconst caption = await client.captions.update(videoId,\ - \ language, captionsUpdatePayload);\n \n" + \ 'en'; // A valid language identifier using IETF language tags. You can\ + \ use primary subtags like `en` (English), extended subtags like `fr-CA`\ + \ (French, Canada), or region subtags like `zh-Hans-CN` (Simplified Chinese\ + \ used in the PRC).\nconst captionsUpdatePayload = {\n _default: true,\n\ + }; \n \nconst caption = await client.captions.update(videoId, language,\ + \ captionsUpdatePayload);\n \n" - language: python code: "# First install the api client with \"pip install api.video\"\n#\ \ Documentation: https://github.com/apivideo/api.video-python-client/blob/main/docs/CaptionsApi.md#update\n\ @@ -5297,11 +5393,13 @@ paths: \ as api_client:\n # Create an instance of the API class\n api_instance\ \ = captions_api.CaptionsApi(api_client)\n video_id = \"vi4k0jvEUuaTdRAEjQ4Prklg\"\ \ # str | The unique identifier for the video you want to have automatic\ - \ captions for.\n language = \"en\" # str | A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers)\ - \ language representation.\n captions_update_payload = CaptionsUpdatePayload(\n\ - \ default=True,\n ) # CaptionsUpdatePayload | \n\n # example\ - \ passing only required values which don't have defaults set\n try:\n\ - \ # Update caption\n api_response = api_instance.update(video_id,\ + \ captions for.\n language = \"en\" # str | A valid language identifier\ + \ using IETF language tags. You can use primary subtags like `en` (English),\ + \ extended subtags like `fr-CA` (French, Canada), or region subtags like\ + \ `zh-Hans-CN` (Simplified Chinese used in the PRC).\n captions_update_payload\ + \ = CaptionsUpdatePayload(\n default=True,\n ) # CaptionsUpdatePayload\ + \ | \n\n # example passing only required values which don't have defaults\ + \ set\n try:\n # Update caption\n api_response = api_instance.update(video_id,\ \ language, captions_update_payload)\n pprint(api_response)\n \ \ except apivideo.ApiException as e:\n print(\"Exception when\ \ calling CaptionsApi->update: %s\\\n\" % e)\n" @@ -5317,9 +5415,11 @@ paths: , ApiVideoClient.Environment.SANDBOX);\n\n CaptionsApi apiInstance\ \ = client.captions();\n \n String videoId = \"vi4k0jvEUuaTdRAEjQ4Prklg\"\ ; // The unique identifier for the video you want to have automatic captions\ - \ for.\n String language = \"en\"; // A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers)\ - \ language representation.\n CaptionsUpdatePayload captionsUpdatePayload\ - \ = new CaptionsUpdatePayload(); // \n captionsUpdatePayload.setDefault();\ + \ for.\n String language = \"en\"; // A valid language identifier using\ + \ IETF language tags. You can use primary subtags like `en` (English),\ + \ extended subtags like `fr-CA` (French, Canada), or region subtags like\ + \ `zh-Hans-CN` (Simplified Chinese used in the PRC).\n CaptionsUpdatePayload\ + \ captionsUpdatePayload = new CaptionsUpdatePayload(); // \n captionsUpdatePayload.setDefault();\ \ // \n\n\n try {\n Caption result = apiInstance.update(videoId,\ \ language, captionsUpdatePayload);\n System.out.println(result);\n\ \ } catch (ApiException e) {\n System.err.println(\"Exception\ @@ -5337,8 +5437,10 @@ paths: \ = new ApiVideoClient(apiKey,basePath);\n\n var videoId =\ \ vi4k0jvEUuaTdRAEjQ4Prklg; // string | The unique identifier for the\ \ video you want to have automatic captions for.\n var language\ - \ = en; // string | A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers)\ - \ language representation.\n var captionsUpdatePayload = new\ + \ = en; // string | A valid language identifier using IETF language tags.\ + \ You can use primary subtags like `en` (English), extended subtags like\ + \ `fr-CA` (French, Canada), or region subtags like `zh-Hans-CN` (Simplified\ + \ Chinese used in the PRC).\n var captionsUpdatePayload = new\ \ CaptionsUpdatePayload(); // CaptionsUpdatePayload | \n var\ \ apiCaptionsInstance = apiInstance.Captions();\n try\n \ \ {\n // Update caption\n Caption\ @@ -5353,8 +5455,10 @@ paths: \n// Documentation: https://github.com/apivideo/api.video-php-client/blob/main/docs/Api/CaptionsApi.md#update\n\ \nrequire __DIR__ . '/vendor/autoload.php';\n\n$videoId = 'vi4k0jvEUuaTdRAEjQ4Prklg';\ \ // The unique identifier for the video you want to have automatic captions\ - \ for.\n$language = 'en'; // A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers)\ - \ language representation.\n\n$captionsUpdatePayload = (new \\ApiVideo\\\ + \ for.\n$language = 'en'; // A valid language identifier using IETF language\ + \ tags. You can use primary subtags like `en` (English), extended subtags\ + \ like `fr-CA` (French, Canada), or region subtags like `zh-Hans-CN` (Simplified\ + \ Chinese used in the PRC).\n\n$captionsUpdatePayload = (new \\ApiVideo\\\ Client\\Model\\CaptionsUpdatePayload())\n ->setDefault(true);\n \n\ $caption = $client->captions()->update($videoId, $language, $captionsUpdatePayload); " - language: swift @@ -5378,7 +5482,12 @@ paths: schema: type: string style: simple - - description: A valid BCP 47 language representation. + - description: |- + A valid language identifier using IETF language tags. You can use primary subtags like `en` (English), extended subtags like `fr-CA` (French, Canada), or region subtags like `zh-Hans-CN` (Simplified Chinese used in the PRC). + + - This parameter **only accepts dashes for separators**, for example `fr-CA`. If you use a different separator in your request, the API returns an error. + - When the value in your request does not match any covered language, the API returns an error. + - This endpoint uses [Symfony](https://symfony.com) to reference the list of supported language tags. You can find the list of supported tags [here](https://github.com/symfony/symfony/blob/6.3/src/Symfony/Component/Intl/Resources/data/locales/meta.php). example: en explode: false in: path @@ -5403,6 +5512,7 @@ paths: uri: /videos/vi3N6cDinStg3oBbN79GklWS/captions/en src: https://cdn.api.video/vod/vi3N6cDinStg3oBbN79GklWS/captions/en.vtt srclang: en + languageName: English default: false schema: $ref: '#/components/schemas/caption' @@ -5410,9 +5520,29 @@ paths: "400": content: application/json: + examples: + Invalid language formatting: + description: This error occurs when the language tag you provided + contains characters other than letters and dashes. + value: + type: https://docs.api.video/reference/invalid-attribute + title: An attribute is invalid. + status: 400 + detail: The "language" attribute must contain only letters and + dashes (for example "fr", "fr-BE"). + name: language + Invalid language: + description: This error occurs when the language tag you provided + does not match any supported language. + value: + type: https://docs.api.video/reference/invalid-attribute + title: An attribute is invalid. + status: 400 + detail: The "language" attribute is not valid. + name: language schema: $ref: '#/components/schemas/bad-request' - description: Bad Request + description: Bad request error "404": content: application/json: @@ -5437,24 +5567,29 @@ paths: \ := apivideosdk.SandboxClientBuilder(\"YOUR_SANDBOX_API_KEY\").Build()\n\ \ \n videoId := \"vi4k0jvEUuaTdRAEjQ4Prklg\" // string | The\ \ unique identifier for the video you want to add a caption to.\n language\ - \ := \"en\" // string | A valid BCP 47 language representation.\n file\ - \ := os.NewFile(1234, \"some_file\") // *os.File | The video text track\ - \ (VTT) you want to upload.\n\n \n res, err := client.Captions.UploadFile(videoId,\ - \ language, file)\n\n // you can also use a Reader instead of a File:\n\ - \ // client.Captions.Upload(videoId, language, fileName, fileReader)\n\ - \n if err != nil {\n fmt.Fprintf(os.Stderr, \"Error when calling\ - \ `Captions.Upload``: %v\\\n\", err)\n }\n // response from `Upload`:\ - \ Caption\n fmt.Fprintf(os.Stdout, \"Response from `Captions.Upload`:\ - \ %v\\\n\", res)\n}\n" + \ := \"en\" // string | A valid language identifier using IETF language\ + \ tags. You can use primary subtags like `en` (English), extended subtags\ + \ like `fr-CA` (French, Canada), or region subtags like `zh-Hans-CN` (Simplified\ + \ Chinese used in the PRC).\n file := os.NewFile(1234, \"some_file\"\ + ) // *os.File | The video text track (VTT) you want to upload.\n\n \ + \ \n res, err := client.Captions.UploadFile(videoId, language, file)\n\ + \n // you can also use a Reader instead of a File:\n // client.Captions.Upload(videoId,\ + \ language, fileName, fileReader)\n\n if err != nil {\n fmt.Fprintf(os.Stderr,\ + \ \"Error when calling `Captions.Upload``: %v\\\n\", err)\n }\n \ + \ // response from `Upload`: Caption\n fmt.Fprintf(os.Stdout, \"Response\ + \ from `Captions.Upload`: %v\\\n\", res)\n}\n" - language: node code: "// First install the \"@api.video/nodejs-client\" npm package\n//\ \ Documentation: https://github.com/apivideo/api.video-nodejs-client/blob/main/doc/api/CaptionsApi.md#upload\n\ \nconst client = new ApiVideoClient({ apiKey: \"YOUR_API_KEY\" });\n\n\ const videoId = 'vi4k0jvEUuaTdRAEjQ4Prklg'; // The unique identifier for\ \ the video you want to add a caption to.\nconst language = 'en'; // A\ - \ valid BCP 47 language representation.\nconst file = './en.vtt'; // The\ - \ video text track (VTT) you want to upload.\n\nconst caption = await\ - \ client.captions.upload(videoId, language, file); " + \ valid language identifier using IETF language tags. You can use primary\ + \ subtags like `en` (English), extended subtags like `fr-CA` (French,\ + \ Canada), or region subtags like `zh-Hans-CN` (Simplified Chinese used\ + \ in the PRC).\nconst file = './en.vtt'; // The video text track (VTT)\ + \ you want to upload.\n\nconst caption = await client.captions.upload(videoId,\ + \ language, file); " - language: python code: | # First install the api client with "pip install api.video" @@ -5472,7 +5607,7 @@ paths: # Create an instance of the API class api_instance = captions_api.CaptionsApi(api_client) video_id = "vi4k0jvEUuaTdRAEjQ4Prklg" # str | The unique identifier for the video you want to add a caption to. - language = "en" # str | A valid BCP 47 language representation. + language = "en" # str | A valid language identifier using IETF language tags. You can use primary subtags like `en` (English), extended subtags like `fr-CA` (French, Canada), or region subtags like `zh-Hans-CN` (Simplified Chinese used in the PRC). file = open('/path/to/file', 'rb') # file_type | The video text track (VTT) you want to upload. # example passing only required values which don't have defaults set @@ -5494,8 +5629,10 @@ paths: , ApiVideoClient.Environment.SANDBOX);\n\n CaptionsApi apiInstance\ \ = client.captions();\n \n String videoId = \"vi4k0jvEUuaTdRAEjQ4Prklg\"\ ; // The unique identifier for the video you want captions for.\n String\ - \ language = \"en\"; // A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers)\ - \ language representation\n\n try {\n Caption result = apiInstance.get(videoId,\ + \ language = \"en\"; // A valid language identifier using IETF language\ + \ tags. You can use primary subtags like `en` (English), extended subtags\ + \ like `fr-CA` (French, Canada), or region subtags like `zh-Hans-CN` (Simplified\ + \ Chinese used in the PRC).\n\n try {\n Caption result = apiInstance.get(videoId,\ \ language);\n System.out.println(result);\n } catch (ApiException\ \ e) {\n System.err.println(\"Exception when calling CaptionsApi#get\"\ );\n System.err.println(\"Status code: \" + e.getCode());\n \ @@ -5522,7 +5659,7 @@ paths: var apiInstance = new ApiVideoClient(apiKey,basePath); var videoId = vi4k0jvEUuaTdRAEjQ4Prklg; // string | The unique identifier for the video you want to add a caption to. - var language = en; // string | A valid BCP 47 language representation. + var language = en; // string | A valid language identifier using IETF language tags. You can use primary subtags like `en` (English), extended subtags like `fr-CA` (French, Canada), or region subtags like `zh-Hans-CN` (Simplified Chinese used in the PRC). var file = BINARY_DATA_HERE; // System.IO.Stream | The video text track (VTT) you want to upload. var apiCaptionsInstance = apiInstance.Captions(); try @@ -5545,9 +5682,11 @@ paths: \n// Documentation: https://github.com/apivideo/api.video-php-client/blob/main/docs/Api/CaptionsApi.md#upload\n\ \nrequire __DIR__ . '/vendor/autoload.php';\n\n$videoId = 'vi4k0jvEUuaTdRAEjQ4Prklg';\ \ // The unique identifier for the video you want to add a caption to.\n\ - $language = 'en'; // A valid BCP 47 language representation.\n$file =\ - \ new SplFileObject(__DIR__ . '/en.vtt'); // The video text track (VTT)\ - \ you want to upload.\n\n$caption = $client->captions()->upload($videoId,\ + $language = 'en'; // A valid language identifier using IETF language tags.\ + \ You can use primary subtags like `en` (English), extended subtags like\ + \ `fr-CA` (French, Canada), or region subtags like `zh-Hans-CN` (Simplified\ + \ Chinese used in the PRC).\n$file = new SplFileObject(__DIR__ . '/en.vtt');\ + \ // The video text track (VTT) you want to upload.\n\n$caption = $client->captions()->upload($videoId,\ \ $language, $file); " - language: swift code: | @@ -5602,10 +5741,12 @@ paths: - uri: /videos/vi3N6cDinStg3oBbN79GklWS/captions/en src: https://cdn.api.video/vod/vi3N6cDinStg3oBbN79GklWS/captions/en.vtt srclang: en + languageName: English default: false - uri: /videos/vi3N6cDinStg3oBbN79GklWS/captions/fr src: https://cdn.api.video/vod/vi3N6cDinStg3oBbN79GklWS/captions/fr.vtt srclang: fr + languageName: Française default: false pagination: currentPage: 1 @@ -5649,8 +5790,10 @@ paths: \ := apivideosdk.SandboxClientBuilder(\"YOUR_SANDBOX_API_KEY\").Build()\n\ \ \n videoId := \"vi4k0jvEUuaTdRAEjQ4Prklg\" // string | The\ \ unique identifier for the video you want captions for.\n language\ - \ := \"en\" // string | A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers)\ - \ language representation\n\n \n res, err := client.Captions.Get(videoId,\ + \ := \"en\" // string | A valid language identifier using IETF language\ + \ tags. You can use primary subtags like `en` (English), extended subtags\ + \ like `fr-CA` (French, Canada), or region subtags like `zh-Hans-CN` (Simplified\ + \ Chinese used in the PRC).\n\n \n res, err := client.Captions.Get(videoId,\ \ language)\n\n if err != nil {\n fmt.Fprintf(os.Stderr, \"\ Error when calling `Captions.Get``: %v\\\n\", err)\n }\n // response\ \ from `Get`: Caption\n fmt.Fprintf(os.Stdout, \"Response from `Captions.Get`:\ @@ -5680,7 +5823,7 @@ paths: # Create an instance of the API class api_instance = captions_api.CaptionsApi(api_client) video_id = "vi4k0jvEUuaTdRAEjQ4Prklg" # str | The unique identifier for the video you want captions for. - language = "en" # str | A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers) language representation + language = "en" # str | A valid language identifier using IETF language tags. You can use primary subtags like `en` (English), extended subtags like `fr-CA` (French, Canada), or region subtags like `zh-Hans-CN` (Simplified Chinese used in the PRC). # example passing only required values which don't have defaults set try: @@ -5701,8 +5844,10 @@ paths: , ApiVideoClient.Environment.SANDBOX);\n\n CaptionsApi apiInstance\ \ = client.captions();\n \n String videoId = \"vi4k0jvEUuaTdRAEjQ4Prklg\"\ ; // The unique identifier for the video you want captions for.\n String\ - \ language = \"en\"; // A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers)\ - \ language representation\n\n try {\n Caption result = apiInstance.get(videoId,\ + \ language = \"en\"; // A valid language identifier using IETF language\ + \ tags. You can use primary subtags like `en` (English), extended subtags\ + \ like `fr-CA` (French, Canada), or region subtags like `zh-Hans-CN` (Simplified\ + \ Chinese used in the PRC).\n\n try {\n Caption result = apiInstance.get(videoId,\ \ language);\n System.out.println(result);\n } catch (ApiException\ \ e) {\n System.err.println(\"Exception when calling CaptionsApi#get\"\ );\n System.err.println(\"Status code: \" + e.getCode());\n \ @@ -5729,7 +5874,7 @@ paths: var apiInstance = new ApiVideoClient(apiKey,basePath); var videoId = vi4k0jvEUuaTdRAEjQ4Prklg; // string | The unique identifier for the video you want captions for. - var language = en; // string | A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers) language representation + var language = en; // string | A valid language identifier using IETF language tags. You can use primary subtags like `en` (English), extended subtags like `fr-CA` (French, Canada), or region subtags like `zh-Hans-CN` (Simplified Chinese used in the PRC). var apiCaptionsInstance = apiInstance.Captions(); try { @@ -10257,15 +10402,27 @@ components: caption: example: default: false - src: src - srclang: srclang - uri: uri + src: https://cdn.api.video/vod/vi1111DinStg3oBbN79GklWS/captions/sr-Cyrl.vtt + srclang: sr-Cyrl + uri: /videos/vi1111DinStg3oBbN79GklWS/captions/sr-Cyrl + languageName: српски (ћирилица) properties: uri: + description: The unique resource identifier of the uploaded caption. + example: /videos/vi1111DinStg3oBbN79GklWS/captions/sr-Cyrl type: string src: + description: A direct URL to the uploaded caption file. + example: https://cdn.api.video/vod/vi1111DinStg3oBbN79GklWS/captions/sr-Cyrl.vtt type: string srclang: + description: Indicates the language of the uploaded caption file using IETF + language tags. + example: sr-Cyrl + type: string + languageName: + description: Returns the native name of the caption language in UTF-8 encoding. + example: српски (ћирилица) type: string default: default: false @@ -11202,13 +11359,15 @@ components: uri: /videos/search?currentPage=6&pageSize=20 data: - default: false - src: src - srclang: srclang - uri: uri + src: https://cdn.api.video/vod/vi1111DinStg3oBbN79GklWS/captions/sr-Cyrl.vtt + srclang: sr-Cyrl + uri: /videos/vi1111DinStg3oBbN79GklWS/captions/sr-Cyrl + languageName: српски (ћирилица) - default: false - src: src - srclang: srclang - uri: uri + src: https://cdn.api.video/vod/vi1111DinStg3oBbN79GklWS/captions/sr-Cyrl.vtt + srclang: sr-Cyrl + uri: /videos/vi1111DinStg3oBbN79GklWS/captions/sr-Cyrl + languageName: српски (ћирилица) properties: data: items: diff --git a/docs/Caption.md b/docs/Caption.md index a12d050..e07ac70 100644 --- a/docs/Caption.md +++ b/docs/Caption.md @@ -6,9 +6,10 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**uri** | **String** | | [optional] -**src** | **String** | | [optional] -**srclang** | **String** | | [optional] +**uri** | **String** | The unique resource identifier of the uploaded caption. | [optional] +**src** | **String** | A direct URL to the uploaded caption file. | [optional] +**srclang** | **String** | Indicates the language of the uploaded caption file using IETF language tags. | [optional] +**languageName** | **String** | Returns the native name of the caption language in UTF-8 encoding. | [optional] **_default** | **Boolean** | Whether you will have subtitles or not. True for yes you will have subtitles, false for no you will not have subtitles. | [optional] diff --git a/docs/CaptionsApi.md b/docs/CaptionsApi.md index 159dffc..6a4f5f5 100644 --- a/docs/CaptionsApi.md +++ b/docs/CaptionsApi.md @@ -37,7 +37,7 @@ public class Example { CaptionsApi apiInstance = client.captions(); String videoId = "vi4k0jvEUuaTdRAEjQ4Prklg"; // The unique identifier for the video you want to add a caption to. - String language = "en"; // A valid BCP 47 language representation. + String language = "en"; // A valid language identifier using IETF language tags. You can use primary subtags like `en` (English), extended subtags like `fr-CA` (French, Canada), or region subtags like `zh-Hans-CN` (Simplified Chinese used in the PRC). - This parameter **only accepts dashes for separators**, for example `fr-CA`. If you use a different separator in your request, the API returns an error. - When the value in your request does not match any covered language, the API returns an error. - This endpoint uses [Symfony](https://symfony.com) to reference the list of supported language tags. You can find the list of supported tags [here](https://github.com/symfony/symfony/blob/6.3/src/Symfony/Component/Intl/Resources/data/locales/meta.php). File file = new File("/path/to/file"); // The video text track (VTT) you want to upload. try { @@ -59,7 +59,7 @@ public class Example { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **videoId** | **String**| The unique identifier for the video you want to add a caption to. | - **language** | **String**| A valid BCP 47 language representation. | + **language** | **String**| A valid language identifier using IETF language tags. You can use primary subtags like `en` (English), extended subtags like `fr-CA` (French, Canada), or region subtags like `zh-Hans-CN` (Simplified Chinese used in the PRC). - This parameter **only accepts dashes for separators**, for example `fr-CA`. If you use a different separator in your request, the API returns an error. - When the value in your request does not match any covered language, the API returns an error. - This endpoint uses [Symfony](https://symfony.com) to reference the list of supported language tags. You can find the list of supported tags [here](https://github.com/symfony/symfony/blob/6.3/src/Symfony/Component/Intl/Resources/data/locales/meta.php). | **file** | **File**| The video text track (VTT) you want to upload. | ### Return type @@ -80,7 +80,7 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | Success | - | -**400** | Bad Request | - | +**400** | Bad request error | - | **404** | Not Found | - | @@ -111,7 +111,7 @@ public class Example { CaptionsApi apiInstance = client.captions(); String videoId = "vi4k0jvEUuaTdRAEjQ4Prklg"; // The unique identifier for the video you want captions for. - String language = "en"; // A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers) language representation + String language = "en"; // A valid language identifier using IETF language tags. You can use primary subtags like `en` (English), extended subtags like `fr-CA` (French, Canada), or region subtags like `zh-Hans-CN` (Simplified Chinese used in the PRC). - This parameter **only accepts dashes for separators**, for example `fr-CA`. If you use a different separator in your request, the API returns an error. - When the value in your request does not match any covered language, the API returns an error. - This endpoint uses [Symfony](https://symfony.com) to reference the list of supported language tags. You can find the list of supported tags [here](https://github.com/symfony/symfony/blob/6.3/src/Symfony/Component/Intl/Resources/data/locales/meta.php). try { Caption result = apiInstance.get(videoId, language); @@ -132,7 +132,7 @@ public class Example { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **videoId** | **String**| The unique identifier for the video you want captions for. | - **language** | **String**| A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers) language representation | + **language** | **String**| A valid language identifier using IETF language tags. You can use primary subtags like `en` (English), extended subtags like `fr-CA` (French, Canada), or region subtags like `zh-Hans-CN` (Simplified Chinese used in the PRC). - This parameter **only accepts dashes for separators**, for example `fr-CA`. If you use a different separator in your request, the API returns an error. - When the value in your request does not match any covered language, the API returns an error. - This endpoint uses [Symfony](https://symfony.com) to reference the list of supported language tags. You can find the list of supported tags [here](https://github.com/symfony/symfony/blob/6.3/src/Symfony/Component/Intl/Resources/data/locales/meta.php). | ### Return type @@ -152,6 +152,7 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | Success | - | +**400** | Bad request error | - | **404** | Not Found | - | @@ -180,7 +181,7 @@ public class Example { CaptionsApi apiInstance = client.captions(); String videoId = "vi4k0jvEUuaTdRAEjQ4Prklg"; // The unique identifier for the video you want to have automatic captions for. - String language = "en"; // A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers) language representation. + String language = "en"; // A valid language identifier using IETF language tags. You can use primary subtags like `en` (English), extended subtags like `fr-CA` (French, Canada), or region subtags like `zh-Hans-CN` (Simplified Chinese used in the PRC). - This parameter **only accepts dashes for separators**, for example `fr-CA`. If you use a different separator in your request, the API returns an error. - When the value in your request does not match any covered language, the API returns an error. - This endpoint uses [Symfony](https://symfony.com) to reference the list of supported language tags. You can find the list of supported tags [here](https://github.com/symfony/symfony/blob/6.3/src/Symfony/Component/Intl/Resources/data/locales/meta.php). CaptionsUpdatePayload captionsUpdatePayload = new CaptionsUpdatePayload(); // captionsUpdatePayload.setDefault(); // @@ -204,7 +205,7 @@ public class Example { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **videoId** | **String**| The unique identifier for the video you want to have automatic captions for. | - **language** | **String**| A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers) language representation. | + **language** | **String**| A valid language identifier using IETF language tags. You can use primary subtags like `en` (English), extended subtags like `fr-CA` (French, Canada), or region subtags like `zh-Hans-CN` (Simplified Chinese used in the PRC). - This parameter **only accepts dashes for separators**, for example `fr-CA`. If you use a different separator in your request, the API returns an error. - When the value in your request does not match any covered language, the API returns an error. - This endpoint uses [Symfony](https://symfony.com) to reference the list of supported language tags. You can find the list of supported tags [here](https://github.com/symfony/symfony/blob/6.3/src/Symfony/Component/Intl/Resources/data/locales/meta.php). | **captionsUpdatePayload** | [**CaptionsUpdatePayload**](CaptionsUpdatePayload.md)| | ### Return type @@ -225,7 +226,7 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | Success | - | -**400** | Bad Request | - | +**400** | Bad request error | - | **404** | Not Found | - | @@ -254,7 +255,7 @@ public class Example { CaptionsApi apiInstance = client.captions(); String videoId = "vi4k0jvEUuaTdRAEjQ4Prklgc"; // The unique identifier for the video you want to delete a caption from. - String language = "en"; // A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers) language representation. + String language = "en"; // A valid language identifier using IETF language tags. You can use primary subtags like `en` (English), extended subtags like `fr-CA` (French, Canada), or region subtags like `zh-Hans-CN` (Simplified Chinese used in the PRC). - This parameter **only accepts dashes for separators**, for example `fr-CA`. If you use a different separator in your request, the API returns an error. - When the value in your request does not match any covered language, the API returns an error. - This endpoint uses [Symfony](https://symfony.com) to reference the list of supported language tags. You can find the list of supported tags [here](https://github.com/symfony/symfony/blob/6.3/src/Symfony/Component/Intl/Resources/data/locales/meta.php). try { apiInstance.delete(videoId, language); @@ -274,7 +275,7 @@ public class Example { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **videoId** | **String**| The unique identifier for the video you want to delete a caption from. | - **language** | **String**| A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers) language representation. | + **language** | **String**| A valid language identifier using IETF language tags. You can use primary subtags like `en` (English), extended subtags like `fr-CA` (French, Canada), or region subtags like `zh-Hans-CN` (Simplified Chinese used in the PRC). - This parameter **only accepts dashes for separators**, for example `fr-CA`. If you use a different separator in your request, the API returns an error. - When the value in your request does not match any covered language, the API returns an error. - This endpoint uses [Symfony](https://symfony.com) to reference the list of supported language tags. You can find the list of supported tags [here](https://github.com/symfony/symfony/blob/6.3/src/Symfony/Component/Intl/Resources/data/locales/meta.php). | ### Return type @@ -294,6 +295,7 @@ null (empty response body) | Status code | Description | Response headers | |-------------|-------------|------------------| **204** | No Content | - | +**400** | Bad request error | - | **404** | Not Found | - | diff --git a/src/main/java/video/api/client/api/clients/CaptionsApi.java b/src/main/java/video/api/client/api/clients/CaptionsApi.java index b377003..cbae28a 100644 --- a/src/main/java/video/api/client/api/clients/CaptionsApi.java +++ b/src/main/java/video/api/client/api/clients/CaptionsApi.java @@ -104,7 +104,15 @@ public void setApiClient(ApiClient apiClient) { * @param videoId * The unique identifier for the video you want to add a caption to. (required) * @param language - * A valid BCP 47 language representation. (required) + * A valid language identifier using IETF language tags. You can use primary subtags like `en` + * (English), extended subtags like `fr-CA` (French, Canada), or region subtags like + * `zh-Hans-CN` (Simplified Chinese used in the PRC). - This parameter **only accepts dashes + * for separators**, for example `fr-CA`. If you use a different separator in your request, the + * API returns an error. - When the value in your request does not match any covered language, the API + * returns an error. - This endpoint uses [Symfony](https://symfony.com) to reference the list of + * supported language tags. You can find the list of supported tags + * [here](https://github.com/symfony/symfony/blob/6.3/src/Symfony/Component/Intl/Resources/data/locales/meta.php). + * (required) * @param file * The video text track (VTT) you want to upload. (required) * @param _callback @@ -129,7 +137,7 @@ public void setApiClient(ApiClient apiClient) { * *