Package video.api.client.api.clients
Class CaptionsApi
- java.lang.Object
-
- video.api.client.api.clients.CaptionsApi
-
public class CaptionsApi extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classCaptionsApi.APIlistRequest
-
Constructor Summary
Constructors Constructor Description CaptionsApi()Constructor for CaptionsApi production environment where API key is not required.CaptionsApi(String basePath)Constructor for CaptionsApi with custom API base path where API key is not required.CaptionsApi(String apiKey, String basePath)Constructor for CaptionsApi with custom API base pathCaptionsApi(ApiClient apiClient)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddelete(String videoId, String language)Delete a caption Delete a caption in a specific language by providing the video ID for the video you want to delete the caption from and the language the caption is in.ApiResponse<Void>deleteWithHttpInfo(String videoId, String language)Delete a caption Delete a caption in a specific language by providing the video ID for the video you want to delete the caption from and the language the caption is in.Captionget(String videoId, String language)Show a caption Display a caption for a video in a specific language.ApiClientgetApiClient()ApiResponse<Caption>getWithHttpInfo(String videoId, String language)Show a caption Display a caption for a video in a specific language.CaptionsApi.APIlistRequestlist(String videoId)List video captions Retrieve a list of available captions for the videoId you provide.voidsetApiClient(ApiClient apiClient)Captionupdate(String videoId, String language, CaptionsUpdatePayload captionsUpdatePayload)Update caption To have the captions on automatically, use this PATCH to set default: true.ApiResponse<Caption>updateWithHttpInfo(String videoId, String language, CaptionsUpdatePayload captionsUpdatePayload)Update caption To have the captions on automatically, use this PATCH to set default: true.Captionupload(String videoId, String language, File file)Upload a caption Upload a VTT file to add captions to your video.ApiResponse<Caption>uploadWithHttpInfo(String videoId, String language, File file)Upload a caption Upload a VTT file to add captions to your video.
-
-
-
Constructor Detail
-
CaptionsApi
public CaptionsApi(ApiClient apiClient)
-
CaptionsApi
public CaptionsApi()
Constructor for CaptionsApi production environment where API key is not required.
-
CaptionsApi
public CaptionsApi(String basePath)
Constructor for CaptionsApi with custom API base path where API key is not required.- Parameters:
basePath- the api base path. Expected Environment.PRODUCTION.basePath (default) or Environment.SANDBOX.basePath.
-
-
Method Detail
-
getApiClient
public ApiClient getApiClient()
-
setApiClient
public void setApiClient(ApiClient apiClient)
-
delete
public void delete(String videoId, String language) throws ApiException
Delete a caption Delete a caption in a specific language by providing the video ID for the video you want to delete the caption from and the language the caption is in.- Parameters:
videoId- The unique identifier for the video you want to delete a caption from. (required)language- A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers) language representation. (required)- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body- Http Response Details:
Status Code Description Response Headers 204 No Content - 404 Not Found -
-
deleteWithHttpInfo
public ApiResponse<Void> deleteWithHttpInfo(String videoId, String language) throws ApiException
Delete a caption Delete a caption in a specific language by providing the video ID for the video you want to delete the caption from and the language the caption is in.- Parameters:
videoId- The unique identifier for the video you want to delete a caption from. (required)language- A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers) language representation. (required)- Returns:
- ApiResponse<Void>
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body- Http Response Details:
Status Code Description Response Headers 204 No Content - 404 Not Found -
-
list
public CaptionsApi.APIlistRequest list(String videoId)
List video captions Retrieve a list of available captions for the videoId you provide.- Parameters:
videoId- The unique identifier for the video you want to retrieve a list of captions for. (required)- Returns:
- APIlistRequest
- Http Response Details:
Status Code Description Response Headers 200 Success - 404 Not Found -
-
get
public Caption get(String videoId, String language) throws ApiException
Show a caption Display a caption for a video in a specific language. If the language is available, the caption is returned. Otherwise, you will get a response indicating the caption was not found. Tutorials that use the [captions endpoint](https://api.video/blog/endpoints/captions).- Parameters:
videoId- The unique identifier for the video you want captions for. (required)language- A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers) language representation (required)- Returns:
- Caption
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body- Http Response Details:
Status Code Description Response Headers 200 Success - 404 Not Found -
-
getWithHttpInfo
public ApiResponse<Caption> getWithHttpInfo(String videoId, String language) throws ApiException
Show a caption Display a caption for a video in a specific language. If the language is available, the caption is returned. Otherwise, you will get a response indicating the caption was not found. Tutorials that use the [captions endpoint](https://api.video/blog/endpoints/captions).- Parameters:
videoId- The unique identifier for the video you want captions for. (required)language- A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers) language representation (required)- Returns:
- ApiResponse<Caption>
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body- Http Response Details:
Status Code Description Response Headers 200 Success - 404 Not Found -
-
update
public Caption update(String videoId, String language, CaptionsUpdatePayload captionsUpdatePayload) throws ApiException
Update caption To have the captions on automatically, use this PATCH to set default: true.- Parameters:
videoId- The unique identifier for the video you want to have automatic captions for. (required)language- A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers) language representation. (required)captionsUpdatePayload- (required)- Returns:
- Caption
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body- Http Response Details:
Status Code Description Response Headers 200 Success - 400 Bad Request - 404 Not Found -
-
updateWithHttpInfo
public ApiResponse<Caption> updateWithHttpInfo(String videoId, String language, CaptionsUpdatePayload captionsUpdatePayload) throws ApiException
Update caption To have the captions on automatically, use this PATCH to set default: true.- Parameters:
videoId- The unique identifier for the video you want to have automatic captions for. (required)language- A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers) language representation. (required)captionsUpdatePayload- (required)- Returns:
- ApiResponse<Caption>
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body- Http Response Details:
Status Code Description Response Headers 200 Success - 400 Bad Request - 404 Not Found -
-
upload
public Caption upload(String videoId, String language, File file) throws ApiException
Upload a caption Upload a VTT file to add captions to your video. Read our [captioning tutorial](https://api.video/blog/tutorials/adding-captions) for more details.- Parameters:
videoId- The unique identifier for the video you want to add a caption to. (required)language- A valid BCP 47 language representation. (required)file- The video text track (VTT) you want to upload. (required)- Returns:
- Caption
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body- Http Response Details:
Status Code Description Response Headers 200 Success - 400 Bad Request - 404 Not Found -
-
uploadWithHttpInfo
public ApiResponse<Caption> uploadWithHttpInfo(String videoId, String language, File file) throws ApiException
Upload a caption Upload a VTT file to add captions to your video. Read our [captioning tutorial](https://api.video/blog/tutorials/adding-captions) for more details.- Parameters:
videoId- The unique identifier for the video you want to add a caption to. (required)language- A valid BCP 47 language representation. (required)file- The video text track (VTT) you want to upload. (required)- Returns:
- ApiResponse<Caption>
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body- Http Response Details:
Status Code Description Response Headers 200 Success - 400 Bad Request - 404 Not Found -
-
-