
target.apidocs.com.google.api.services.youtube.YouTube.Videos.html Maven / Gradle / Ivy
YouTube.Videos (YouTube Data API v3-rev20190415-1.28.0)
com.google.api.services.youtube
Class YouTube.Videos
- java.lang.Object
-
- com.google.api.services.youtube.YouTube.Videos
-
-
Nested Class Summary
Nested Classes
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.ReportAbuse
class
YouTube.Videos.Update
-
Constructor Summary
Constructors
Constructor and Description
Videos()
-
Method Summary
All Methods Instance Methods Concrete Methods
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,
com.google.api.client.http.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.ReportAbuse
reportAbuse(VideoAbuseReport content)
Report abuse for a video.
YouTube.Videos.Update
update(String part,
Video content)
Updates a video's metadata.
-
-
Method Detail
-
delete
public YouTube.Videos.Delete delete(String id)
throws IOException
Deletes a YouTube video.
Create a request for the method "videos.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 specifies the YouTube video ID for the resource that is being deleted. In a video
resource, the id property specifies the video's ID.
- Returns:
- the request
- Throws:
IOException
-
getRating
public YouTube.Videos.GetRating getRating(String id)
throws IOException
Retrieves the ratings that the authorized user gave to a list of specified videos.
Create a request for the method "videos.getRating".
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 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.
- Returns:
- the request
- Throws:
IOException
-
insert
public YouTube.Videos.Insert insert(String part,
Video content)
throws IOException
Uploads a video to YouTube and optionally sets the video's metadata.
Create a request for the method "videos.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 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.
Note that not all parts contain properties that can be set when inserting or updating a
video. 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
- Returns:
- the request
- Throws:
IOException
-
insert
public YouTube.Videos.Insert insert(String part,
Video content,
com.google.api.client.http.AbstractInputStreamContent mediaContent)
throws IOException
Uploads a video to YouTube and optionally sets the video's metadata.
Create a request for the method "videos.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 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.
Note that not all parts contain properties that can be set when inserting or updating a
video. 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 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.Videos.List list(String part)
throws IOException
Returns a list of videos that match the API request parameters.
Create a request for the method "videos.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 video resource properties that
the API response will include.
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.
- Returns:
- the request
- Throws:
IOException
-
rate
public YouTube.Videos.Rate rate(String id,
String rating)
throws IOException
Add a like or dislike rating to a video or remove a rating from a video.
Create a request for the method "videos.rate".
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 specifies the YouTube video ID of the video that is being rated or having its
rating removed.
rating
- Specifies the rating to record.
- Returns:
- the request
- Throws:
IOException
-
reportAbuse
public YouTube.Videos.ReportAbuse reportAbuse(VideoAbuseReport content)
throws IOException
Report abuse for a video.
Create a request for the method "videos.reportAbuse".
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:
content
- the VideoAbuseReport
- Returns:
- the request
- Throws:
IOException
-
update
public YouTube.Videos.Update update(String part,
Video content)
throws IOException
Updates a video's metadata.
Create a request for the method "videos.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.
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 parts
contain properties that can be set when inserting or updating a video. 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
- Returns:
- the request
- Throws:
IOException
Copyright © 2011–2019 Google. All rights reserved.
© 2015 - 2025 Weber Informatics LLC | Privacy Policy