
target.apidocs.com.google.api.services.youtube.YouTube.ChannelBanners.html Maven / Gradle / Ivy
YouTube.ChannelBanners (YouTube Data API v3-rev20200213-1.30.9)
com.google.api.services.youtube
Class YouTube.ChannelBanners
- java.lang.Object
-
- com.google.api.services.youtube.YouTube.ChannelBanners
-
-
Nested Class Summary
Nested Classes
Modifier and Type
Class and Description
class
YouTube.ChannelBanners.Insert
-
Constructor Summary
Constructors
Constructor and Description
ChannelBanners()
-
Method Summary
All Methods Instance Methods Concrete Methods
Modifier and Type
Method and Description
YouTube.ChannelBanners.Insert
insert(ChannelBannerResource content)
Uploads a channel banner image to YouTube.
YouTube.ChannelBanners.Insert
insert(ChannelBannerResource content,
AbstractInputStreamContent mediaContent)
Uploads a channel banner image to YouTube.
-
-
Method Detail
-
insert
public YouTube.ChannelBanners.Insert insert(ChannelBannerResource content)
throws IOException
Uploads a channel banner image to YouTube. This method represents the first two steps in a three-
step process to update the banner image for a channel:
- Call the channelBanners.insert method to upload the binary image data to YouTube. The image
must have a 16:9 aspect ratio and be at least 2120x1192 pixels. - Extract the url property's
value from the response that the API returns for step 1. - Call the channels.update method to
update the channel's branding settings. Set the brandingSettings.image.bannerExternalUrl
property's value to the URL obtained in step 2.
Create a request for the method "channelBanners.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:
content
- the ChannelBannerResource
- Returns:
- the request
- Throws:
IOException
-
insert
public YouTube.ChannelBanners.Insert insert(ChannelBannerResource content,
AbstractInputStreamContent mediaContent)
throws IOException
Uploads a channel banner image to YouTube. This method represents the first two steps in a three-
step process to update the banner image for a channel:
- Call the channelBanners.insert method to upload the binary image data to YouTube. The image
must have a 16:9 aspect ratio and be at least 2120x1192 pixels. - Extract the url property's
value from the response that the API returns for step 1. - Call the channels.update method to
update the channel's branding settings. Set the brandingSettings.image.bannerExternalUrl
property's value to the URL obtained in step 2.
Create a request for the method "channelBanners.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:
content
- the ChannelBannerResource
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