From bda7c30b2d79110001f7faa2b2edaeb1606fb0f8 Mon Sep 17 00:00:00 2001 From: szekelyzol Date: Mon, 27 Nov 2023 15:57:35 +0000 Subject: [PATCH] Update Captions in the API reference --- .../oas_apivideo.yaml-defaut-cli.sha256 | 2 +- docs/Caption.md | 7 +++--- docs/CaptionsApi.md | 22 ++++++++++--------- src/Api/CaptionsApi.cs | 16 +++++++------- src/Model/Caption.cs | 17 +++++++++++--- .../captions/delete/responses/400-0.json | 7 ++++++ .../captions/delete/responses/400-1.json | 7 ++++++ .../payloads/captions/get/responses/200.json | 1 + .../captions/get/responses/400-0.json | 7 ++++++ .../captions/get/responses/400-1.json | 7 ++++++ .../payloads/captions/list/responses/200.json | 2 ++ .../captions/update/responses/200.json | 1 + .../captions/update/responses/400-0.json | 7 ++++++ .../captions/update/responses/400-1.json | 7 ++++++ .../captions/update/responses/400.json | 7 ------ .../captions/upload/responses/200.json | 1 + .../captions/upload/responses/400-0.json | 7 ++++++ .../captions/upload/responses/400-1.json | 7 ++++++ 18 files changed, 100 insertions(+), 32 deletions(-) create mode 100644 tests/resources/payloads/captions/delete/responses/400-0.json create mode 100644 tests/resources/payloads/captions/delete/responses/400-1.json create mode 100644 tests/resources/payloads/captions/get/responses/400-0.json create mode 100644 tests/resources/payloads/captions/get/responses/400-1.json create mode 100644 tests/resources/payloads/captions/update/responses/400-0.json create mode 100644 tests/resources/payloads/captions/update/responses/400-1.json delete mode 100644 tests/resources/payloads/captions/update/responses/400.json create mode 100644 tests/resources/payloads/captions/upload/responses/400-0.json create mode 100644 tests/resources/payloads/captions/upload/responses/400-1.json diff --git a/.openapi-generator/oas_apivideo.yaml-defaut-cli.sha256 b/.openapi-generator/oas_apivideo.yaml-defaut-cli.sha256 index 893dd94..2c81844 100644 --- a/.openapi-generator/oas_apivideo.yaml-defaut-cli.sha256 +++ b/.openapi-generator/oas_apivideo.yaml-defaut-cli.sha256 @@ -1 +1 @@ -1d4d58267d0aabd2f6d0cc27edace1a106ca7a51c9059dbfb1b196ec098aee44 \ No newline at end of file +20b55cdf69d53ef2d692c059cb3ffd7b8856b3965f52947e63fa25cdb7425f8f \ No newline at end of file diff --git a/docs/Caption.md b/docs/Caption.md index 1d6f948..d4a148b 100644 --- a/docs/Caption.md +++ b/docs/Caption.md @@ -4,9 +4,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** | **bool** | Whether you will have subtitles or not. True for yes you will have subtitles, false for no you will not have subtitles. | [optional] [default to false] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CaptionsApi.md b/docs/CaptionsApi.md index f6c7a50..f574bff 100644 --- a/docs/CaptionsApi.md +++ b/docs/CaptionsApi.md @@ -36,7 +36,7 @@ namespace Example 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). - 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). var file = BINARY_DATA_HERE; // System.IO.Stream | The video text track (VTT) you want to upload. var apiCaptionsInstance = apiInstance.Captions(); try @@ -61,7 +61,7 @@ namespace 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** | **System.IO.Stream****System.IO.Stream**| The video text track (VTT) you want to upload. | ### Return type @@ -78,7 +78,7 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| | **200** | Success | - | -| **400** | Bad Request | - | +| **400** | Bad request error | - | | **404** | Not Found | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -110,7 +110,7 @@ namespace Example 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). - 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). var apiCaptionsInstance = apiInstance.Captions(); try { @@ -134,7 +134,7 @@ namespace 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 @@ -150,6 +150,7 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| | **200** | Success | - | +| **400** | Bad request error | - | | **404** | Not Found | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -179,7 +180,7 @@ namespace Example var apiInstance = new ApiVideoClient(apiKey,basePath); var videoId = vi4k0jvEUuaTdRAEjQ4Prklg; // string | The unique identifier for the video you want to have automatic 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). - 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). var captionsUpdatePayload = new CaptionsUpdatePayload(); // CaptionsUpdatePayload | var apiCaptionsInstance = apiInstance.Captions(); try @@ -204,7 +205,7 @@ namespace 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 @@ -221,7 +222,7 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| | **200** | Success | - | -| **400** | Bad Request | - | +| **400** | Bad request error | - | | **404** | Not Found | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -251,7 +252,7 @@ namespace Example 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). - 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). var apiCaptionsInstance = apiInstance.Captions(); try { @@ -274,7 +275,7 @@ namespace 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 @@ -290,6 +291,7 @@ void (empty response body) | Status code | Description | Response headers | |-------------|-------------|------------------| | **204** | No Content | - | +| **400** | Bad request error | - | | **404** | Not Found | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/src/Api/CaptionsApi.cs b/src/Api/CaptionsApi.cs index 97f6aaf..e3f8d94 100644 --- a/src/Api/CaptionsApi.cs +++ b/src/Api/CaptionsApi.cs @@ -44,7 +44,7 @@ public CaptionsApi(ApiClient apiClient) /// /// Thrown when fails to make API call /// The unique identifier for the video you want to add a caption to. -/// A valid BCP 47 language representation. +/// 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). /// The video text track (VTT) you want to upload. /// Caption @@ -59,7 +59,7 @@ public Caption upload(string videoId, string language, System.IO.Stream file) /// /// Thrown when fails to make API call /// The unique identifier for the video you want to add a caption to. -/// A valid BCP 47 language representation. +/// 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). /// The video text track (VTT) you want to upload. /// ApiResponse of Caption @@ -131,7 +131,7 @@ public ApiResponse uploadWithHttpInfo(string videoId, string language, /// /// Thrown when fails to make API call /// The unique identifier for the video you want captions for. -/// A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers) language representation +/// 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). /// Caption public Caption get(string videoId, string language) @@ -147,7 +147,7 @@ public Caption get(string videoId, string language) /// /// Thrown when fails to make API call /// The unique identifier for the video you want captions for. -/// A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers) language representation +/// 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). /// ApiResponse of Caption public ApiResponse getWithHttpInfo(string videoId, string language) @@ -207,7 +207,7 @@ public ApiResponse getWithHttpInfo(string videoId, string language) /// /// Thrown when fails to make API call /// The unique identifier for the video you want to have automatic captions for. -/// A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers) language representation. +/// 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). /// /// Caption @@ -222,7 +222,7 @@ public Caption update(string videoId, string language, CaptionsUpdatePayload cap /// /// Thrown when fails to make API call /// The unique identifier for the video you want to have automatic captions for. -/// A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers) language representation. +/// 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). /// /// ApiResponse of Caption @@ -305,7 +305,7 @@ public ApiResponse updateWithHttpInfo(string videoId, string language, /// /// Thrown when fails to make API call /// The unique identifier for the video you want to delete a caption from. -/// A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers) language representation. +/// 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). /// public void delete(string videoId, string language) @@ -318,7 +318,7 @@ public void delete(string videoId, string language) /// /// Thrown when fails to make API call /// The unique identifier for the video you want to delete a caption from. -/// A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers) language representation. +/// 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). /// ApiResponse of Object(void) public ApiResponse deleteWithHttpInfo(string videoId, string language) diff --git a/src/Model/Caption.cs b/src/Model/Caption.cs index bf8fd50..80e8815 100644 --- a/src/Model/Caption.cs +++ b/src/Model/Caption.cs @@ -13,24 +13,34 @@ namespace ApiVideo.Model { [DataContract] public class Caption { /// - /// Gets or Sets Uri + /// The unique resource identifier of the uploaded caption. /// + /// The unique resource identifier of the uploaded caption. [DataMember(Name="uri", EmitDefaultValue=false)] [JsonProperty(PropertyName = "uri")] public string uri { get; set; } /// - /// Gets or Sets Src + /// A direct URL to the uploaded caption file. /// + /// A direct URL to the uploaded caption file. [DataMember(Name="src", EmitDefaultValue=false)] [JsonProperty(PropertyName = "src")] public string src { get; set; } /// - /// Gets or Sets Srclang + /// Indicates the language of the uploaded caption file using IETF language tags. /// + /// Indicates the language of the uploaded caption file using IETF language tags. [DataMember(Name="srclang", EmitDefaultValue=false)] [JsonProperty(PropertyName = "srclang")] public string srclang { get; set; } /// + /// Returns the native name of the caption language in UTF-8 encoding. + /// + /// Returns the native name of the caption language in UTF-8 encoding. + [DataMember(Name="languageName", EmitDefaultValue=false)] + [JsonProperty(PropertyName = "languageName")] + public string languagename { get; set; } + /// /// Whether you will have subtitles or not. True for yes you will have subtitles, false for no you will not have subtitles. /// /// Whether you will have subtitles or not. True for yes you will have subtitles, false for no you will not have subtitles. @@ -57,6 +67,7 @@ public class Caption { sb.Append(" Uri: ").Append(uri).Append("\n"); sb.Append(" Src: ").Append(src).Append("\n"); sb.Append(" Srclang: ").Append(srclang).Append("\n"); + sb.Append(" LanguageName: ").Append(languagename).Append("\n"); sb.Append(" Default: ").Append(_default).Append("\n"); sb.Append("}\n"); return sb.ToString(); diff --git a/tests/resources/payloads/captions/delete/responses/400-0.json b/tests/resources/payloads/captions/delete/responses/400-0.json new file mode 100644 index 0000000..c67814e --- /dev/null +++ b/tests/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/tests/resources/payloads/captions/delete/responses/400-1.json b/tests/resources/payloads/captions/delete/responses/400-1.json new file mode 100644 index 0000000..fc103e0 --- /dev/null +++ b/tests/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/tests/resources/payloads/captions/get/responses/200.json b/tests/resources/payloads/captions/get/responses/200.json index cc57937..8c3c102 100644 --- a/tests/resources/payloads/captions/get/responses/200.json +++ b/tests/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/tests/resources/payloads/captions/get/responses/400-0.json b/tests/resources/payloads/captions/get/responses/400-0.json new file mode 100644 index 0000000..c67814e --- /dev/null +++ b/tests/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/tests/resources/payloads/captions/get/responses/400-1.json b/tests/resources/payloads/captions/get/responses/400-1.json new file mode 100644 index 0000000..fc103e0 --- /dev/null +++ b/tests/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/tests/resources/payloads/captions/list/responses/200.json b/tests/resources/payloads/captions/list/responses/200.json index e3e49d9..c47b58d 100644 --- a/tests/resources/payloads/captions/list/responses/200.json +++ b/tests/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/tests/resources/payloads/captions/update/responses/200.json b/tests/resources/payloads/captions/update/responses/200.json index 22adfca..a41f483 100644 --- a/tests/resources/payloads/captions/update/responses/200.json +++ b/tests/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/tests/resources/payloads/captions/update/responses/400-0.json b/tests/resources/payloads/captions/update/responses/400-0.json new file mode 100644 index 0000000..c67814e --- /dev/null +++ b/tests/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/tests/resources/payloads/captions/update/responses/400-1.json b/tests/resources/payloads/captions/update/responses/400-1.json new file mode 100644 index 0000000..fc103e0 --- /dev/null +++ b/tests/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/tests/resources/payloads/captions/update/responses/400.json b/tests/resources/payloads/captions/update/responses/400.json deleted file mode 100644 index 0ea79a3..0000000 --- a/tests/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/tests/resources/payloads/captions/upload/responses/200.json b/tests/resources/payloads/captions/upload/responses/200.json index cc57937..8c3c102 100644 --- a/tests/resources/payloads/captions/upload/responses/200.json +++ b/tests/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/tests/resources/payloads/captions/upload/responses/400-0.json b/tests/resources/payloads/captions/upload/responses/400-0.json new file mode 100644 index 0000000..c67814e --- /dev/null +++ b/tests/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/tests/resources/payloads/captions/upload/responses/400-1.json b/tests/resources/payloads/captions/upload/responses/400-1.json new file mode 100644 index 0000000..fc103e0 --- /dev/null +++ b/tests/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