All Downloads are FREE. Search and download functionalities are using the official Maven repository.

target.apidocs.com.google.api.services.youtube.YouTube.Captions.html Maven / Gradle / Ivy







YouTube.Captions (YouTube Data API v3-rev20200320-1.30.9)












com.google.api.services.youtube

Class YouTube.Captions

  • Enclosing class:
    YouTube


    public class YouTube.Captions
    extends Object
    The "captions" collection of methods.
    • Constructor Detail

      • Captions

        public Captions()
    • Method Detail

      • delete

        public YouTube.Captions.Delete delete(String id)
                                       throws IOException
        Deletes a specified caption track. Create a request for the method "captions.delete". This request holds the parameters needed by the youtube server. After setting any optional parameters, call the AbstractGoogleClientRequest.execute() method to invoke the remote operation.
        Parameters:
        id - The id parameter identifies the caption track that is being deleted. The value is a caption track ID as identified by the id property in a caption resource.
        Returns:
        the request
        Throws:
        IOException
      • download

        public YouTube.Captions.Download download(String id)
                                           throws IOException
        Downloads a caption track. The caption track is returned in its original format unless the request specifies a value for the tfmt parameter and in its original language unless the request specifies a value for the tlang parameter. Create a request for the method "captions.download". This request holds the parameters needed by the youtube server. After setting any optional parameters, call the AbstractGoogleClientRequest.execute() method to invoke the remote operation.
        Parameters:
        id - The id parameter identifies the caption track that is being retrieved. The value is a caption track ID as identified by the id property in a caption resource.
        Returns:
        the request
        Throws:
        IOException
      • insert

        public YouTube.Captions.Insert insert(String part,
                                              Caption content)
                                       throws IOException
        Uploads a caption track. Create a request for the method "captions.insert". This request holds the parameters needed by the youtube server. After setting any optional parameters, call the AbstractGoogleClientRequest.execute() method to invoke the remote operation.
        Parameters:
        part - The part parameter specifies the caption resource parts that the API response will include. Set the parameter value to snippet.
        content - the Caption
        Returns:
        the request
        Throws:
        IOException
      • insert

        public YouTube.Captions.Insert insert(String part,
                                              Caption content,
                                              AbstractInputStreamContent mediaContent)
                                       throws IOException
        Uploads a caption track. Create a request for the method "captions.insert". This request holds the parameters needed by the the youtube server. After setting any optional parameters, call the AbstractGoogleClientRequest.execute() method to invoke the remote operation.

        This method should be used for uploading media content.

        Parameters:
        part - The part parameter specifies the caption resource parts that the API response will include. Set the parameter value to snippet.
        content - the Caption media metadata or null if none
        mediaContent - The media HTTP content or null if none.
        Returns:
        the request
        Throws:
        IOException - if the initialization of the request fails
      • list

        public YouTube.Captions.List list(String part,
                                          String videoId)
                                   throws IOException
        Returns a list of caption tracks that are associated with a specified video. Note that the API response does not contain the actual captions and that the captions.download method provides the ability to retrieve a caption track. Create a request for the method "captions.list". This request holds the parameters needed by the youtube server. After setting any optional parameters, call the AbstractGoogleClientRequest.execute() method to invoke the remote operation.
        Parameters:
        part - The part parameter specifies a comma-separated list of one or more caption resource parts that the API response will include. The part names that you can include in the parameter value are id and snippet.
        videoId - The videoId parameter specifies the YouTube video ID of the video for which the API should return caption tracks.
        Returns:
        the request
        Throws:
        IOException
      • update

        public YouTube.Captions.Update update(String part,
                                              Caption content)
                                       throws IOException
        Updates a caption track. When updating a caption track, you can change the track's draft status, upload a new caption file for the track, or both. Create a request for the method "captions.update". This request holds the parameters needed by the youtube server. After setting any optional parameters, call the AbstractGoogleClientRequest.execute() method to invoke the remote operation.
        Parameters:
        part - The part parameter serves two purposes in this operation. It identifies the properties that the write operation will set as well as the properties that the API response will include. Set the property value to snippet if you are updating the track's draft status. Otherwise, set the property value to id.
        content - the Caption
        Returns:
        the request
        Throws:
        IOException
      • update

        public YouTube.Captions.Update update(String part,
                                              Caption content,
                                              AbstractInputStreamContent mediaContent)
                                       throws IOException
        Updates a caption track. When updating a caption track, you can change the track's draft status, upload a new caption file for the track, or both. Create a request for the method "captions.update". This request holds the parameters needed by the the youtube server. After setting any optional parameters, call the AbstractGoogleClientRequest.execute() method to invoke the remote operation.

        This method should be used for uploading media content.

        Parameters:
        part - The part parameter serves two purposes in this operation. It identifies the properties that the write operation will set as well as the properties that the API response will include. Set the property value to snippet if you are updating the track's draft status. Otherwise, set the property value to id.
        content - the Caption media metadata or null if none
        mediaContent - The media HTTP content or null if none.
        Returns:
        the request
        Throws:
        IOException - if the initialization of the request fails

Copyright © 2011–2020 Google. All rights reserved.





© 2015 - 2025 Weber Informatics LLC | Privacy Policy