Class CaptionsApi


  • public class CaptionsApi
    extends Object
    • Constructor Detail

      • CaptionsApi

        public CaptionsApi​(ApiClient apiClient)
    • 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 -