
target.apidocs.com.google.api.services.youtube.YouTube.Captions.html Maven / Gradle / Ivy
YouTube.Captions (YouTube Data API v3-rev20190415-1.28.0)
com.google.api.services.youtube
Class YouTube.Captions
- java.lang.Object
-
- com.google.api.services.youtube.YouTube.Captions
-
-
Nested Class Summary
Nested Classes
Modifier and Type
Class and Description
class
YouTube.Captions.Delete
class
YouTube.Captions.Download
class
YouTube.Captions.Insert
class
YouTube.Captions.List
class
YouTube.Captions.Update
-
Constructor Summary
Constructors
Constructor and Description
Captions()
-
Method Summary
All Methods Instance Methods Concrete Methods
Modifier and Type
Method and Description
YouTube.Captions.Delete
delete(String id)
Deletes a specified caption track.
YouTube.Captions.Download
download(String id)
Downloads a caption track.
YouTube.Captions.Insert
insert(String part,
Caption content)
Uploads a caption track.
YouTube.Captions.Insert
insert(String part,
Caption content,
com.google.api.client.http.AbstractInputStreamContent mediaContent)
Uploads a caption track.
YouTube.Captions.List
list(String part,
String videoId)
Returns a list of caption tracks that are associated with a specified video.
YouTube.Captions.Update
update(String part,
Caption content)
Updates a caption track.
YouTube.Captions.Update
update(String part,
Caption content,
com.google.api.client.http.AbstractInputStreamContent mediaContent)
Updates a caption track.
-
-
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,
com.google.api.client.http.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,
com.google.api.client.http.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–2019 Google. All rights reserved.
© 2015 - 2025 Weber Informatics LLC | Privacy Policy