target.apidocs.com.google.api.services.youtube.YouTube.Videos.html Maven / Gradle / Ivy
YouTube.Videos (YouTube Data API v3 v3-rev20210410-1.31.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 resource.
YouTube.Videos.GetRating
getRating(List<String> id)
Retrieves the ratings that the authorized user gave to a list of specified videos.
YouTube.Videos.Insert
insert(List<String> part,
Video content)
Inserts a new resource into this collection.
YouTube.Videos.Insert
insert(List<String> part,
Video content,
AbstractInputStreamContent mediaContent)
Inserts a new resource into this collection.
YouTube.Videos.List
list(List<String> part)
Retrieves a list of resources, possibly filtered.
YouTube.Videos.Rate
rate(String id,
String rating)
Adds a like or dislike rating to a video or removes a rating from a video.
YouTube.Videos.ReportAbuse
reportAbuse(VideoAbuseReport content)
Report abuse for a video.
YouTube.Videos.Update
update(List<String> part,
Video content)
Updates an existing resource.
-
-
Method Detail
-
delete
public YouTube.Videos.Delete delete(String id)
throws IOException
Deletes a resource.
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
-
- Returns:
- the request
- Throws:
IOException
-
getRating
public YouTube.Videos.GetRating getRating(List<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
-
- Returns:
- the request
- Throws:
IOException
-
insert
public YouTube.Videos.Insert insert(List<String> part,
Video content)
throws IOException
Inserts a new resource into this collection.
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(List<String> part,
Video content,
AbstractInputStreamContent mediaContent)
throws IOException
Inserts a new resource into this collection.
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(List<String> part)
throws IOException
Retrieves a list of resources, possibly filtered.
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
Adds a like or dislike rating to a video or removes 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
-
rating
-
- 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(List<String> part,
Video content)
throws IOException
Updates an existing resource.
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–2021 Google. All rights reserved.