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) { * * * 400 - * Bad Request + * Bad request error * - * * @@ -204,7 +212,15 @@ private okhttp3.Call uploadValidateBeforeCall(String videoId, String language, F * @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) * @@ -227,7 +243,7 @@ private okhttp3.Call uploadValidateBeforeCall(String videoId, String language, F * * * 400 - * Bad Request + * Bad request error * - * * @@ -251,7 +267,15 @@ public Caption upload(String videoId, String language, File file) throws ApiExce * @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) * @@ -274,7 +298,7 @@ public Caption upload(String videoId, String language, File file) throws ApiExce * * * 400 - * Bad Request + * Bad request error * - * * @@ -298,7 +322,15 @@ public ApiResponse uploadWithHttpInfo(String videoId, String language, * @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 @@ -323,7 +355,7 @@ public ApiResponse uploadWithHttpInfo(String videoId, String language, * * * 400 - * Bad Request + * Bad request error * - * * @@ -348,8 +380,15 @@ public okhttp3.Call uploadAsync(String videoId, String language, File file, fina * @param videoId * The unique identifier for the video you want captions for. (required) * @param language - * A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers) 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 _callback * Callback for upload/download progress * @@ -371,6 +410,11 @@ public okhttp3.Call uploadAsync(String videoId, String language, File file, fina * - * * + * 400 + * Bad request error + * - + * + * * 404 * Not Found * - @@ -436,8 +480,15 @@ private okhttp3.Call getValidateBeforeCall(String videoId, String language, fina * @param videoId * The unique identifier for the video you want captions for. (required) * @param language - * A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers) 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) * * @return Caption * @@ -457,6 +508,11 @@ private okhttp3.Call getValidateBeforeCall(String videoId, String language, fina * - * * + * 400 + * Bad request error + * - + * + * * 404 * Not Found * - @@ -479,8 +535,15 @@ public Caption get(String videoId, String language) throws ApiException { * @param videoId * The unique identifier for the video you want captions for. (required) * @param language - * A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers) 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) * * @return ApiResponse<Caption> * @@ -500,6 +563,11 @@ public Caption get(String videoId, String language) throws ApiException { * - * * + * 400 + * Bad request error + * - + * + * * 404 * Not Found * - @@ -522,8 +590,15 @@ public ApiResponse getWithHttpInfo(String videoId, String language) thr * @param videoId * The unique identifier for the video you want captions for. (required) * @param language - * A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers) 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 _callback * The callback to be executed when the API call finishes * @@ -545,6 +620,11 @@ public ApiResponse getWithHttpInfo(String videoId, String language) thr * - * * + * 400 + * Bad request error + * - + * + * * 404 * Not Found * - @@ -566,8 +646,15 @@ public okhttp3.Call getAsync(String videoId, String language, final ApiCallback< * @param videoId * The unique identifier for the video you want to have automatic captions for. (required) * @param language - * A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers) 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 captionsUpdatePayload * (required) * @param _callback @@ -592,7 +679,7 @@ public okhttp3.Call getAsync(String videoId, String language, final ApiCallback< * * * 400 - * Bad Request + * Bad request error * - * * @@ -662,8 +749,15 @@ private okhttp3.Call updateValidateBeforeCall(String videoId, String language, * @param videoId * The unique identifier for the video you want to have automatic captions for. (required) * @param language - * A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers) 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 captionsUpdatePayload * (required) * @@ -686,7 +780,7 @@ private okhttp3.Call updateValidateBeforeCall(String videoId, String language, * * * 400 - * Bad Request + * Bad request error * - * * @@ -710,8 +804,15 @@ public Caption update(String videoId, String language, CaptionsUpdatePayload cap * @param videoId * The unique identifier for the video you want to have automatic captions for. (required) * @param language - * A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers) 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 captionsUpdatePayload * (required) * @@ -734,7 +835,7 @@ public Caption update(String videoId, String language, CaptionsUpdatePayload cap * * * 400 - * Bad Request + * Bad request error * - * * @@ -758,8 +859,15 @@ public ApiResponse updateWithHttpInfo(String videoId, String language, * @param videoId * The unique identifier for the video you want to have automatic captions for. (required) * @param language - * A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers) 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 captionsUpdatePayload * (required) * @param _callback @@ -784,7 +892,7 @@ public ApiResponse updateWithHttpInfo(String videoId, String language, * * * 400 - * Bad Request + * Bad request error * - * * @@ -809,8 +917,15 @@ public okhttp3.Call updateAsync(String videoId, String language, CaptionsUpdateP * @param videoId * The unique identifier for the video you want to delete a caption from. (required) * @param language - * A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers) 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 _callback * Callback for upload/download progress * @@ -832,6 +947,11 @@ public okhttp3.Call updateAsync(String videoId, String language, CaptionsUpdateP * - * * + * 400 + * Bad request error + * - + * + * * 404 * Not Found * - @@ -894,8 +1014,15 @@ private okhttp3.Call deleteValidateBeforeCall(String videoId, String language, f * @param videoId * The unique identifier for the video you want to delete a caption from. (required) * @param language - * A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers) 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) * * @throws ApiException * If fail to call the API, e.g. server error or cannot deserialize the response body @@ -913,6 +1040,11 @@ private okhttp3.Call deleteValidateBeforeCall(String videoId, String language, f * - * * + * 400 + * Bad request error + * - + * + * * 404 * Not Found * - @@ -931,8 +1063,15 @@ public void delete(String videoId, String language) throws ApiException { * @param videoId * The unique identifier for the video you want to delete a caption from. (required) * @param language - * A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers) 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) * * @return ApiResponse<Void> * @@ -952,6 +1091,11 @@ public void delete(String videoId, String language) throws ApiException { * - * * + * 400 + * Bad request error + * - + * + * * 404 * Not Found * - @@ -969,8 +1113,15 @@ public ApiResponse deleteWithHttpInfo(String videoId, String language) thr * @param videoId * The unique identifier for the video you want to delete a caption from. (required) * @param language - * A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers) 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 _callback * The callback to be executed when the API call finishes * @@ -992,6 +1143,11 @@ public ApiResponse deleteWithHttpInfo(String videoId, String language) thr * - * * + * 400 + * Bad request error + * - + * + * * 404 * Not Found * - diff --git a/src/main/java/video/api/client/api/models/Caption.java b/src/main/java/video/api/client/api/models/Caption.java index 8f872cc..476e331 100644 --- a/src/main/java/video/api/client/api/models/Caption.java +++ b/src/main/java/video/api/client/api/models/Caption.java @@ -42,6 +42,10 @@ public class Caption implements Serializable { @SerializedName(SERIALIZED_NAME_SRCLANG) private String srclang; + public static final String SERIALIZED_NAME_LANGUAGE_NAME = "languageName"; + @SerializedName(SERIALIZED_NAME_LANGUAGE_NAME) + private String languageName; + public static final String SERIALIZED_NAME_DEFAULT = "default"; @SerializedName(SERIALIZED_NAME_DEFAULT) private Boolean _default = false; @@ -52,12 +56,12 @@ public Caption uri(String uri) { } /** - * Get uri + * The unique resource identifier of the uploaded caption. * * @return uri **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") + @ApiModelProperty(example = "/videos/vi1111DinStg3oBbN79GklWS/captions/sr-Cyrl", value = "The unique resource identifier of the uploaded caption.") public String getUri() { return uri; @@ -73,12 +77,12 @@ public Caption src(String src) { } /** - * Get src + * A direct URL to the uploaded caption file. * * @return src **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") + @ApiModelProperty(example = "https://cdn.api.video/vod/vi1111DinStg3oBbN79GklWS/captions/sr-Cyrl.vtt", value = "A direct URL to the uploaded caption file.") public String getSrc() { return src; @@ -94,12 +98,12 @@ public Caption srclang(String srclang) { } /** - * Get srclang + * Indicates the language of the uploaded caption file using IETF language tags. * * @return srclang **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") + @ApiModelProperty(example = "sr-Cyrl", value = "Indicates the language of the uploaded caption file using IETF language tags.") public String getSrclang() { return srclang; @@ -109,6 +113,27 @@ public void setSrclang(String srclang) { this.srclang = srclang; } + public Caption languageName(String languageName) { + this.languageName = languageName; + return this; + } + + /** + * Returns the native name of the caption language in UTF-8 encoding. + * + * @return languageName + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "српски (ћирилица)", value = "Returns the native name of the caption language in UTF-8 encoding.") + + public String getLanguageName() { + return languageName; + } + + public void setLanguageName(String languageName) { + this.languageName = languageName; + } + public Caption _default(Boolean _default) { this._default = _default; return this; @@ -141,12 +166,14 @@ public boolean equals(Object o) { } Caption caption = (Caption) o; return Objects.equals(this.uri, caption.uri) && Objects.equals(this.src, caption.src) - && Objects.equals(this.srclang, caption.srclang) && Objects.equals(this._default, caption._default); + && Objects.equals(this.srclang, caption.srclang) + && Objects.equals(this.languageName, caption.languageName) + && Objects.equals(this._default, caption._default); } @Override public int hashCode() { - return Objects.hash(uri, src, srclang, _default); + return Objects.hash(uri, src, srclang, languageName, _default); } @Override @@ -156,6 +183,7 @@ public String toString() { sb.append(" uri: ").append(toIndentedString(uri)).append("\n"); sb.append(" src: ").append(toIndentedString(src)).append("\n"); sb.append(" srclang: ").append(toIndentedString(srclang)).append("\n"); + sb.append(" languageName: ").append(toIndentedString(languageName)).append("\n"); sb.append(" _default: ").append(toIndentedString(_default)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/src/test/resources/payloads/captions/delete/responses/400-0.json b/src/test/resources/payloads/captions/delete/responses/400-0.json new file mode 100644 index 0000000..c67814e --- /dev/null +++ b/src/test/resources/payloads/captions/delete/responses/400-0.json @@ -0,0 +1,7 @@ +{ + "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" +} \ No newline at end of file diff --git a/src/test/resources/payloads/captions/delete/responses/400-1.json b/src/test/resources/payloads/captions/delete/responses/400-1.json new file mode 100644 index 0000000..fc103e0 --- /dev/null +++ b/src/test/resources/payloads/captions/delete/responses/400-1.json @@ -0,0 +1,7 @@ +{ + "type" : "https://docs.api.video/reference/invalid-attribute", + "title" : "An attribute is invalid.", + "status" : 400, + "detail" : "The \"language\" attribute is not valid.", + "name" : "language" +} \ No newline at end of file diff --git a/src/test/resources/payloads/captions/get/responses/200.json b/src/test/resources/payloads/captions/get/responses/200.json index cc57937..8c3c102 100644 --- a/src/test/resources/payloads/captions/get/responses/200.json +++ b/src/test/resources/payloads/captions/get/responses/200.json @@ -2,5 +2,6 @@ "uri" : "/videos/vi3N6cDinStg3oBbN79GklWS/captions/en", "src" : "https://cdn.api.video/vod/vi3N6cDinStg3oBbN79GklWS/captions/en.vtt", "srclang" : "en", + "languageName" : "English", "default" : false } \ No newline at end of file diff --git a/src/test/resources/payloads/captions/get/responses/400-0.json b/src/test/resources/payloads/captions/get/responses/400-0.json new file mode 100644 index 0000000..c67814e --- /dev/null +++ b/src/test/resources/payloads/captions/get/responses/400-0.json @@ -0,0 +1,7 @@ +{ + "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" +} \ No newline at end of file diff --git a/src/test/resources/payloads/captions/get/responses/400-1.json b/src/test/resources/payloads/captions/get/responses/400-1.json new file mode 100644 index 0000000..fc103e0 --- /dev/null +++ b/src/test/resources/payloads/captions/get/responses/400-1.json @@ -0,0 +1,7 @@ +{ + "type" : "https://docs.api.video/reference/invalid-attribute", + "title" : "An attribute is invalid.", + "status" : 400, + "detail" : "The \"language\" attribute is not valid.", + "name" : "language" +} \ No newline at end of file diff --git a/src/test/resources/payloads/captions/list/responses/200.json b/src/test/resources/payloads/captions/list/responses/200.json index e3e49d9..c47b58d 100644 --- a/src/test/resources/payloads/captions/list/responses/200.json +++ b/src/test/resources/payloads/captions/list/responses/200.json @@ -3,11 +3,13 @@ "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" : { diff --git a/src/test/resources/payloads/captions/update/responses/200.json b/src/test/resources/payloads/captions/update/responses/200.json index 22adfca..a41f483 100644 --- a/src/test/resources/payloads/captions/update/responses/200.json +++ b/src/test/resources/payloads/captions/update/responses/200.json @@ -2,5 +2,6 @@ "uri" : "/videos/vi3N6cDinStg3oBbN79GklWS/captions/en", "src" : "https://cdn.api.video/vod/vi3N6cDinStg3oBbN79GklWS/captions/en.vtt", "srclang" : "en", + "languageName" : "English", "default" : true } \ No newline at end of file diff --git a/src/test/resources/payloads/captions/update/responses/400-0.json b/src/test/resources/payloads/captions/update/responses/400-0.json new file mode 100644 index 0000000..c67814e --- /dev/null +++ b/src/test/resources/payloads/captions/update/responses/400-0.json @@ -0,0 +1,7 @@ +{ + "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" +} \ No newline at end of file diff --git a/src/test/resources/payloads/captions/update/responses/400-1.json b/src/test/resources/payloads/captions/update/responses/400-1.json new file mode 100644 index 0000000..fc103e0 --- /dev/null +++ b/src/test/resources/payloads/captions/update/responses/400-1.json @@ -0,0 +1,7 @@ +{ + "type" : "https://docs.api.video/reference/invalid-attribute", + "title" : "An attribute is invalid.", + "status" : 400, + "detail" : "The \"language\" attribute is not valid.", + "name" : "language" +} \ No newline at end of file diff --git a/src/test/resources/payloads/captions/update/responses/400.json b/src/test/resources/payloads/captions/update/responses/400.json deleted file mode 100644 index 0ea79a3..0000000 --- a/src/test/resources/payloads/captions/update/responses/400.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "type" : "string (required)", - "title" : "string (required)", - "name" : "string (required)", - "status" : "integer (required)", - "problems" : [ null ] -} \ No newline at end of file diff --git a/src/test/resources/payloads/captions/upload/responses/200.json b/src/test/resources/payloads/captions/upload/responses/200.json index cc57937..8c3c102 100644 --- a/src/test/resources/payloads/captions/upload/responses/200.json +++ b/src/test/resources/payloads/captions/upload/responses/200.json @@ -2,5 +2,6 @@ "uri" : "/videos/vi3N6cDinStg3oBbN79GklWS/captions/en", "src" : "https://cdn.api.video/vod/vi3N6cDinStg3oBbN79GklWS/captions/en.vtt", "srclang" : "en", + "languageName" : "English", "default" : false } \ No newline at end of file diff --git a/src/test/resources/payloads/captions/upload/responses/400-0.json b/src/test/resources/payloads/captions/upload/responses/400-0.json new file mode 100644 index 0000000..c67814e --- /dev/null +++ b/src/test/resources/payloads/captions/upload/responses/400-0.json @@ -0,0 +1,7 @@ +{ + "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" +} \ No newline at end of file diff --git a/src/test/resources/payloads/captions/upload/responses/400-1.json b/src/test/resources/payloads/captions/upload/responses/400-1.json new file mode 100644 index 0000000..fc103e0 --- /dev/null +++ b/src/test/resources/payloads/captions/upload/responses/400-1.json @@ -0,0 +1,7 @@ +{ + "type" : "https://docs.api.video/reference/invalid-attribute", + "title" : "An attribute is invalid.", + "status" : 400, + "detail" : "The \"language\" attribute is not valid.", + "name" : "language" +} \ No newline at end of file