Skip to content

Commit

Permalink
Update Captions in the API reference
Browse files Browse the repository at this point in the history
  • Loading branch information
szekelyzol authored Nov 27, 2023
1 parent 32747b8 commit 2ec93c4
Show file tree
Hide file tree
Showing 18 changed files with 562 additions and 162 deletions.
355 changes: 257 additions & 98 deletions api/openapi.yaml

Large diffs are not rendered by default.

7 changes: 4 additions & 3 deletions docs/Caption.md
Original file line number Diff line number Diff line change
Expand Up @@ -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]


Expand Down
22 changes: 12 additions & 10 deletions docs/CaptionsApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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
Expand All @@ -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 | - |

<a name="get"></a>
Expand Down Expand Up @@ -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);
Expand All @@ -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 &#x60;en&#x60; (English), extended subtags like &#x60;fr-CA&#x60; (French, Canada), or region subtags like &#x60;zh-Hans-CN&#x60; (Simplified Chinese used in the PRC). - This parameter **only accepts dashes for separators**, for example &#x60;fr-CA&#x60;. 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

Expand All @@ -152,6 +152,7 @@ Name | Type | Description | Notes
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | Success | - |
**400** | Bad request error | - |
**404** | Not Found | - |

<a name="update"></a>
Expand Down Expand Up @@ -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(); //

Expand All @@ -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 &#x60;en&#x60; (English), extended subtags like &#x60;fr-CA&#x60; (French, Canada), or region subtags like &#x60;zh-Hans-CN&#x60; (Simplified Chinese used in the PRC). - This parameter **only accepts dashes for separators**, for example &#x60;fr-CA&#x60;. 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
Expand All @@ -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 | - |

<a name="delete"></a>
Expand Down Expand Up @@ -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);
Expand All @@ -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 &#x60;en&#x60; (English), extended subtags like &#x60;fr-CA&#x60; (French, Canada), or region subtags like &#x60;zh-Hans-CN&#x60; (Simplified Chinese used in the PRC). - This parameter **only accepts dashes for separators**, for example &#x60;fr-CA&#x60;. 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

Expand All @@ -294,6 +295,7 @@ null (empty response body)
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**204** | No Content | - |
**400** | Bad request error | - |
**404** | Not Found | - |

<a name="list"></a>
Expand Down
Loading

0 comments on commit 2ec93c4

Please sign in to comment.