From 44c9afa34d662f637a081361e737acfb3079d0b0 Mon Sep 17 00:00:00 2001 From: szekelyzol Date: Mon, 27 Nov 2023 15:57:37 +0000 Subject: [PATCH] Update Captions in the API reference --- .../oas_apivideo.yaml-defaut-cli.sha256 | 2 +- Sources/APIs/CaptionsAPI.swift | 16 ++++++++-------- Sources/Models/Caption.swift | 10 +++++++++- .../captions/delete/responses/400-0.json | 7 +++++++ .../captions/delete/responses/400-1.json | 7 +++++++ .../payloads/captions/get/responses/200.json | 1 + .../payloads/captions/get/responses/400-0.json | 7 +++++++ .../payloads/captions/get/responses/400-1.json | 7 +++++++ .../payloads/captions/list/responses/200.json | 2 ++ .../payloads/captions/update/responses/200.json | 1 + .../captions/update/responses/400-0.json | 7 +++++++ .../captions/update/responses/400-1.json | 7 +++++++ .../payloads/captions/update/responses/400.json | 7 ------- .../payloads/captions/upload/responses/200.json | 1 + .../captions/upload/responses/400-0.json | 7 +++++++ .../captions/upload/responses/400-1.json | 7 +++++++ docs/Caption.md | 7 ++++--- docs/CaptionsAPI.md | 16 ++++++++-------- 18 files changed, 91 insertions(+), 28 deletions(-) create mode 100644 Tests/TestResources/payloads/captions/delete/responses/400-0.json create mode 100644 Tests/TestResources/payloads/captions/delete/responses/400-1.json create mode 100644 Tests/TestResources/payloads/captions/get/responses/400-0.json create mode 100644 Tests/TestResources/payloads/captions/get/responses/400-1.json create mode 100644 Tests/TestResources/payloads/captions/update/responses/400-0.json create mode 100644 Tests/TestResources/payloads/captions/update/responses/400-1.json delete mode 100644 Tests/TestResources/payloads/captions/update/responses/400.json create mode 100644 Tests/TestResources/payloads/captions/upload/responses/400-0.json create mode 100644 Tests/TestResources/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/Sources/APIs/CaptionsAPI.swift b/Sources/APIs/CaptionsAPI.swift index c480cfd..9f661cc 100644 --- a/Sources/APIs/CaptionsAPI.swift +++ b/Sources/APIs/CaptionsAPI.swift @@ -16,7 +16,7 @@ open class CaptionsAPI { Upload a caption - parameter videoId: (path) The unique identifier for the video you want to add a caption to. - - parameter language: (path) A valid BCP 47 language representation. + - parameter language: (path) 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). - parameter file: (form) The video text track (VTT) you want to upload. - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects. @@ -39,7 +39,7 @@ open class CaptionsAPI { - POST /videos/{videoId}/captions/{language} - Upload a VTT file to add captions to your video. More information can be found [here](https://docs.api.video/vod/add-captions) - parameter videoId: (path) The unique identifier for the video you want to add a caption to. - - parameter language: (path) A valid BCP 47 language representation. + - parameter language: (path) 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). - parameter file: (form) The video text track (VTT) you want to upload. - returns: RequestBuilder */ @@ -76,7 +76,7 @@ open class CaptionsAPI { Retrieve a caption - parameter videoId: (path) The unique identifier for the video you want captions for. - - parameter language: (path) A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers) language representation + - parameter language: (path) 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). - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects. */ @@ -100,7 +100,7 @@ open class CaptionsAPI { Tutorials that use the [captions endpoint](https://api.video/blog/endpoints/captions). - parameter videoId: (path) The unique identifier for the video you want captions for. - - parameter language: (path) A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers) language representation + - parameter language: (path) 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). - returns: RequestBuilder */ open class func getWithRequestBuilder(videoId: String, language: String) -> RequestBuilder { @@ -132,7 +132,7 @@ Tutorials that use the [captions endpoint](https://api.video/blog/endpoints/capt Update a caption - parameter videoId: (path) The unique identifier for the video you want to have automatic captions for. - - parameter language: (path) A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers) language representation. + - parameter language: (path) 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). - parameter captionsUpdatePayload: (body) - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects. @@ -155,7 +155,7 @@ Tutorials that use the [captions endpoint](https://api.video/blog/endpoints/capt - PATCH /videos/{videoId}/captions/{language} - To have the captions on automatically, use this method to set default: true. - parameter videoId: (path) The unique identifier for the video you want to have automatic captions for. - - parameter language: (path) A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers) language representation. + - parameter language: (path) 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). - parameter captionsUpdatePayload: (body) - returns: RequestBuilder */ @@ -188,7 +188,7 @@ Tutorials that use the [captions endpoint](https://api.video/blog/endpoints/capt Delete a caption - parameter videoId: (path) The unique identifier for the video you want to delete a caption from. - - parameter language: (path) A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers) language representation. + - parameter language: (path) 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). - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects. */ @@ -210,7 +210,7 @@ Tutorials that use the [captions endpoint](https://api.video/blog/endpoints/capt - DELETE /videos/{videoId}/captions/{language} - Delete a caption in a specific language by by video id. - parameter videoId: (path) The unique identifier for the video you want to delete a caption from. - - parameter language: (path) A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers) language representation. + - parameter language: (path) 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). - returns: RequestBuilder */ open class func deleteWithRequestBuilder(videoId: String, language: String) -> RequestBuilder { diff --git a/Sources/Models/Caption.swift b/Sources/Models/Caption.swift index 2c8b0f8..b912ee6 100644 --- a/Sources/Models/Caption.swift +++ b/Sources/Models/Caption.swift @@ -12,16 +12,22 @@ import AnyCodable public struct Caption: Codable, Hashable { + /** The unique resource identifier of the uploaded caption. */ public var uri: String? + /** A direct URL to the uploaded caption file. */ public var src: String? + /** Indicates the language of the uploaded caption file using IETF language tags. */ public var srclang: String? + /** Returns the native name of the caption language in UTF-8 encoding. */ + public var languageName: String? /** Whether you will have subtitles or not. True for yes you will have subtitles, false for no you will not have subtitles. */ public var _default: Bool? = false - public init(uri: String? = nil, src: String? = nil, srclang: String? = nil, _default: Bool? = false) { + public init(uri: String? = nil, src: String? = nil, srclang: String? = nil, languageName: String? = nil, _default: Bool? = false) { self.uri = uri self.src = src self.srclang = srclang + self.languageName = languageName self._default = _default } @@ -29,6 +35,7 @@ public struct Caption: Codable, Hashable { case uri case src case srclang + case languageName case _default = "default" } @@ -39,6 +46,7 @@ public struct Caption: Codable, Hashable { try container.encodeIfPresent(uri, forKey: .uri) try container.encodeIfPresent(src, forKey: .src) try container.encodeIfPresent(srclang, forKey: .srclang) + try container.encodeIfPresent(languageName, forKey: .languageName) try container.encodeIfPresent(_default, forKey: ._default) } } diff --git a/Tests/TestResources/payloads/captions/delete/responses/400-0.json b/Tests/TestResources/payloads/captions/delete/responses/400-0.json new file mode 100644 index 0000000..c67814e --- /dev/null +++ b/Tests/TestResources/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/TestResources/payloads/captions/delete/responses/400-1.json b/Tests/TestResources/payloads/captions/delete/responses/400-1.json new file mode 100644 index 0000000..fc103e0 --- /dev/null +++ b/Tests/TestResources/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/TestResources/payloads/captions/get/responses/200.json b/Tests/TestResources/payloads/captions/get/responses/200.json index cc57937..8c3c102 100644 --- a/Tests/TestResources/payloads/captions/get/responses/200.json +++ b/Tests/TestResources/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/TestResources/payloads/captions/get/responses/400-0.json b/Tests/TestResources/payloads/captions/get/responses/400-0.json new file mode 100644 index 0000000..c67814e --- /dev/null +++ b/Tests/TestResources/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/TestResources/payloads/captions/get/responses/400-1.json b/Tests/TestResources/payloads/captions/get/responses/400-1.json new file mode 100644 index 0000000..fc103e0 --- /dev/null +++ b/Tests/TestResources/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/TestResources/payloads/captions/list/responses/200.json b/Tests/TestResources/payloads/captions/list/responses/200.json index e3e49d9..c47b58d 100644 --- a/Tests/TestResources/payloads/captions/list/responses/200.json +++ b/Tests/TestResources/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/TestResources/payloads/captions/update/responses/200.json b/Tests/TestResources/payloads/captions/update/responses/200.json index 22adfca..a41f483 100644 --- a/Tests/TestResources/payloads/captions/update/responses/200.json +++ b/Tests/TestResources/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/TestResources/payloads/captions/update/responses/400-0.json b/Tests/TestResources/payloads/captions/update/responses/400-0.json new file mode 100644 index 0000000..c67814e --- /dev/null +++ b/Tests/TestResources/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/TestResources/payloads/captions/update/responses/400-1.json b/Tests/TestResources/payloads/captions/update/responses/400-1.json new file mode 100644 index 0000000..fc103e0 --- /dev/null +++ b/Tests/TestResources/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/TestResources/payloads/captions/update/responses/400.json b/Tests/TestResources/payloads/captions/update/responses/400.json deleted file mode 100644 index 0ea79a3..0000000 --- a/Tests/TestResources/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/TestResources/payloads/captions/upload/responses/200.json b/Tests/TestResources/payloads/captions/upload/responses/200.json index cc57937..8c3c102 100644 --- a/Tests/TestResources/payloads/captions/upload/responses/200.json +++ b/Tests/TestResources/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/TestResources/payloads/captions/upload/responses/400-0.json b/Tests/TestResources/payloads/captions/upload/responses/400-0.json new file mode 100644 index 0000000..c67814e --- /dev/null +++ b/Tests/TestResources/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/TestResources/payloads/captions/upload/responses/400-1.json b/Tests/TestResources/payloads/captions/upload/responses/400-1.json new file mode 100644 index 0000000..fc103e0 --- /dev/null +++ b/Tests/TestResources/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 diff --git a/docs/Caption.md b/docs/Caption.md index d7fdf0f..102c42a 100644 --- a/docs/Caption.md +++ b/docs/Caption.md @@ -3,9 +3,10 @@ ## Properties 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 e6b21d6..5490b37 100644 --- a/docs/CaptionsAPI.md +++ b/docs/CaptionsAPI.md @@ -27,7 +27,7 @@ Upload a VTT file to add captions to your video. More information can be found [ import ApiVideoClient let videoId = "videoId_example" // String | The unique identifier for the video you want to add a caption to. -let language = "language_example" // String | A valid BCP 47 language representation. +let language = "language_example" // 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). let file = URL(string: "https://example.com")! // URL | The video text track (VTT) you want to upload. // Upload a caption @@ -48,7 +48,7 @@ CaptionsAPI.upload(videoId: videoId, language: language, file: file) { (response 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** | **URL** | The video text track (VTT) you want to upload. | ### Return type @@ -84,7 +84,7 @@ Tutorials that use the [captions endpoint](https://api.video/blog/endpoints/capt import ApiVideoClient let videoId = "videoId_example" // String | The unique identifier for the video you want captions for. -let language = "language_example" // String | A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers) language representation +let language = "language_example" // 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). // Retrieve a caption CaptionsAPI.get(videoId: videoId, language: language) { (response, error) in @@ -104,7 +104,7 @@ CaptionsAPI.get(videoId: videoId, language: language) { (response, error) in 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 @@ -137,7 +137,7 @@ To have the captions on automatically, use this method to set default: true. import ApiVideoClient let videoId = "videoId_example" // String | The unique identifier for the video you want to have automatic captions for. -let language = "language_example" // String | A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers) language representation. +let language = "language_example" // 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). let captionsUpdatePayload = CaptionsUpdatePayload(_default: false) // CaptionsUpdatePayload | // Update a caption @@ -158,7 +158,7 @@ CaptionsAPI.update(videoId: videoId, language: language, captionsUpdatePayload: 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 @@ -192,7 +192,7 @@ Delete a caption in a specific language by by video id. import ApiVideoClient let videoId = "videoId_example" // String | The unique identifier for the video you want to delete a caption from. -let language = "language_example" // String | A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers) language representation. +let language = "language_example" // 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). // Delete a caption CaptionsAPI.delete(videoId: videoId, language: language) { (response, error) in @@ -212,7 +212,7 @@ CaptionsAPI.delete(videoId: videoId, language: language) { (response, error) in 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