Modifier and Type | Class and Description |
---|---|
class |
YouTube.Videos.Delete |
class |
YouTube.Videos.GetRating |
class |
YouTube.Videos.Insert |
class |
YouTube.Videos.List |
class |
YouTube.Videos.Rate |
class |
YouTube.Videos.Update |
Constructor and Description |
---|
YouTube.Videos() |
Modifier and Type | Method and Description |
---|---|
YouTube.Videos.Delete |
delete(String id)
Deletes a YouTube video.
|
YouTube.Videos.GetRating |
getRating(String id)
Retrieves the ratings that the authorized user gave to a list of specified videos.
|
YouTube.Videos.Insert |
insert(String part,
Video content)
Uploads a video to YouTube and optionally sets the video's metadata.
|
YouTube.Videos.Insert |
insert(String part,
Video content,
AbstractInputStreamContent mediaContent)
Uploads a video to YouTube and optionally sets the video's metadata.
|
YouTube.Videos.List |
list(String part)
Returns a list of videos that match the API request parameters.
|
YouTube.Videos.Rate |
rate(String id,
String rating)
Add a like or dislike rating to a video or remove a rating from a video.
|
YouTube.Videos.Update |
update(String part,
Video content)
Updates a video's metadata.
|
public YouTube.Videos.Delete delete(String id) throws IOException
AbstractGoogleClientRequest.execute()
method to invoke the remote operation.id
- The id parameter specifies the YouTube video ID for the resource that is being deleted. In a video
resource, the id property specifies the video's ID.IOException
public YouTube.Videos.GetRating getRating(String id) throws IOException
AbstractGoogleClientRequest.execute()
method to invoke the remote operation.id
- The id parameter specifies a comma-separated list of the YouTube video ID(s) for the resource(s) for
which you are retrieving rating data. In a video resource, the id property specifies the
video's ID.IOException
public YouTube.Videos.Insert insert(String part, Video content) throws IOException
AbstractGoogleClientRequest.execute()
method to invoke the remote operation.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.
The
part names that you can include in the parameter value are snippet, contentDetails,
fileDetails, liveStreamingDetails, player, processingDetails, recordingDetails,
statistics, status, suggestions, and topicDetails. However, not all of those parts contain
properties that can be set when setting or updating a video's metadata. For example, the
statistics object encapsulates statistics that YouTube calculates for a video and does not
contain values that you can set or modify. If the parameter value specifies a part that
does not contain mutable values, that part will still be included in the API response.content
- the Video
IOException
public YouTube.Videos.Insert insert(String part, Video content, AbstractInputStreamContent mediaContent) throws IOException
AbstractGoogleClientRequest.execute()
method to invoke the remote operation.
This method should be used for uploading media content.
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.
The
part names that you can include in the parameter value are snippet, contentDetails,
fileDetails, liveStreamingDetails, player, processingDetails, recordingDetails,
statistics, status, suggestions, and topicDetails. However, not all of those parts contain
properties that can be set when setting or updating a video's metadata. For example, the
statistics object encapsulates statistics that YouTube calculates for a video and does not
contain values that you can set or modify. If the parameter value specifies a part that
does not contain mutable values, that part will still be included in the API response.content
- the Video
media metadata or null
if nonemediaContent
- The media HTTP content or null
if none.IOException
- if the initialization of the request failspublic YouTube.Videos.List list(String part) throws IOException
AbstractGoogleClientRequest.execute()
method to invoke the remote operation.part
- The part parameter specifies a comma-separated list of one or more video resource properties that
the API response will include. The part names that you can include in the parameter value
are id, snippet, contentDetails, fileDetails, liveStreamingDetails, player,
processingDetails, recordingDetails, statistics, status, suggestions, and topicDetails.
If
the parameter identifies a property that contains child properties, the child properties
will be included in the response. For example, in a video resource, the snippet property
contains the channelId, title, description, tags, and categoryId properties. As such, if
you set part=snippet, the API response will contain all of those properties.IOException
public YouTube.Videos.Rate rate(String id, String rating) throws IOException
AbstractGoogleClientRequest.execute()
method to invoke the remote operation.id
- The id parameter specifies the YouTube video ID of the video that is being rated or having its
rating removed.rating
- Specifies the rating to record.IOException
public YouTube.Videos.Update update(String part, Video content) throws IOException
AbstractGoogleClientRequest.execute()
method to invoke the remote operation.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.
The
part names that you can include in the parameter value are snippet, contentDetails,
fileDetails, liveStreamingDetails, player, processingDetails, recordingDetails,
statistics, status, suggestions, and topicDetails.
Note that this method will override the
existing values for all of the mutable properties that are contained in any parts that the
parameter value specifies. For example, a video's privacy setting is contained in the
status part. As such, if your request is updating a private video, and the request's part
parameter value includes the status part, the video's privacy setting will be updated to
whatever value the request body specifies. If the request body does not specify a value,
the existing privacy setting will be removed and the video will revert to the default
privacy setting.
In addition, not all of those parts contain properties that can be set
when setting or updating a video's metadata. For example, the statistics object
encapsulates statistics that YouTube calculates for a video and does not contain values
that you can set or modify. If the parameter value specifies a part that does not contain
mutable values, that part will still be included in the API response.content
- the Video
IOException