public class YouTube extends AbstractGoogleJsonClient
Programmatic access to YouTube features.
For more information about this service, see the API Documentation
This service uses YouTubeRequestInitializer
to initialize global parameters via its
YouTube.Builder
.
Upgrade warning: this class now extends AbstractGoogleJsonClient
, whereas in prior
version 1.8 it extended GoogleClient
.
Modifier and Type | Class and Description |
---|---|
class |
YouTube.Activities
The "activities" collection of methods.
|
static class |
YouTube.Builder
Builder for
YouTube . |
class |
YouTube.ChannelBanners
The "channelBanners" collection of methods.
|
class |
YouTube.Channels
The "channels" collection of methods.
|
class |
YouTube.GuideCategories
The "guideCategories" collection of methods.
|
class |
YouTube.LiveBroadcasts
The "liveBroadcasts" collection of methods.
|
class |
YouTube.LiveStreams
The "liveStreams" collection of methods.
|
class |
YouTube.PlaylistItems
The "playlistItems" collection of methods.
|
class |
YouTube.Playlists
The "playlists" collection of methods.
|
class |
YouTube.Search
The "search" collection of methods.
|
class |
YouTube.Subscriptions
The "subscriptions" collection of methods.
|
class |
YouTube.Thumbnails
The "thumbnails" collection of methods.
|
class |
YouTube.VideoCategories
The "videoCategories" collection of methods.
|
class |
YouTube.Videos
The "videos" collection of methods.
|
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_BASE_URL
Deprecated.
(scheduled to be removed in 1.13)
|
static String |
DEFAULT_ROOT_URL
The default encoded root URL of the service.
|
static String |
DEFAULT_SERVICE_PATH
The default encoded service path of the service.
|
Constructor and Description |
---|
YouTube(HttpTransport transport,
JsonFactory jsonFactory,
HttpRequestInitializer httpRequestInitializer)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
YouTube.Activities |
activities()
An accessor for creating requests from the Activities collection.
|
YouTube.ChannelBanners |
channelBanners()
An accessor for creating requests from the ChannelBanners collection.
|
YouTube.Channels |
channels()
An accessor for creating requests from the Channels collection.
|
YouTube.GuideCategories |
guideCategories()
An accessor for creating requests from the GuideCategories collection.
|
protected void |
initialize(AbstractGoogleClientRequest<?> httpClientRequest) |
YouTube.LiveBroadcasts |
liveBroadcasts()
An accessor for creating requests from the LiveBroadcasts collection.
|
YouTube.LiveStreams |
liveStreams()
An accessor for creating requests from the LiveStreams collection.
|
YouTube.PlaylistItems |
playlistItems()
An accessor for creating requests from the PlaylistItems collection.
|
YouTube.Playlists |
playlists()
An accessor for creating requests from the Playlists collection.
|
YouTube.Search |
search()
An accessor for creating requests from the Search collection.
|
YouTube.Subscriptions |
subscriptions()
An accessor for creating requests from the Subscriptions collection.
|
YouTube.Thumbnails |
thumbnails()
An accessor for creating requests from the Thumbnails collection.
|
YouTube.VideoCategories |
videoCategories()
An accessor for creating requests from the VideoCategories collection.
|
YouTube.Videos |
videos()
An accessor for creating requests from the Videos collection.
|
getJsonFactory, getObjectParser
batch, batch, getApplicationName, getBaseUrl, getGoogleClientRequestInitializer, getRequestFactory, getRootUrl, getServicePath, getSuppressPatternChecks
public static final String DEFAULT_ROOT_URL
public static final String DEFAULT_SERVICE_PATH
@Deprecated public static final String DEFAULT_BASE_URL
public YouTube(HttpTransport transport, JsonFactory jsonFactory, HttpRequestInitializer httpRequestInitializer)
Use YouTube.Builder
if you need to specify any of the optional parameters.
transport
- HTTP transportjsonFactory
- JSON factoryhttpRequestInitializer
- HTTP request initializer or null
for noneprotected void initialize(AbstractGoogleClientRequest<?> httpClientRequest) throws IOException
initialize
in class AbstractGoogleClient
IOException
public YouTube.Activities activities()
The typical use is:
YouTube youtube = new YouTube(...);
YouTube.Activities.List request = youtube.activities().list(parameters ...)
public YouTube.ChannelBanners channelBanners()
The typical use is:
YouTube youtube = new YouTube(...);
YouTube.ChannelBanners.List request = youtube.channelBanners().list(parameters ...)
public YouTube.Channels channels()
The typical use is:
YouTube youtube = new YouTube(...);
YouTube.Channels.List request = youtube.channels().list(parameters ...)
public YouTube.GuideCategories guideCategories()
The typical use is:
YouTube youtube = new YouTube(...);
YouTube.GuideCategories.List request = youtube.guideCategories().list(parameters ...)
public YouTube.LiveBroadcasts liveBroadcasts()
The typical use is:
YouTube youtube = new YouTube(...);
YouTube.LiveBroadcasts.List request = youtube.liveBroadcasts().list(parameters ...)
public YouTube.LiveStreams liveStreams()
The typical use is:
YouTube youtube = new YouTube(...);
YouTube.LiveStreams.List request = youtube.liveStreams().list(parameters ...)
public YouTube.PlaylistItems playlistItems()
The typical use is:
YouTube youtube = new YouTube(...);
YouTube.PlaylistItems.List request = youtube.playlistItems().list(parameters ...)
public YouTube.Playlists playlists()
The typical use is:
YouTube youtube = new YouTube(...);
YouTube.Playlists.List request = youtube.playlists().list(parameters ...)
public YouTube.Search search()
The typical use is:
YouTube youtube = new YouTube(...);
YouTube.Search.List request = youtube.search().list(parameters ...)
public YouTube.Subscriptions subscriptions()
The typical use is:
YouTube youtube = new YouTube(...);
YouTube.Subscriptions.List request = youtube.subscriptions().list(parameters ...)
public YouTube.Thumbnails thumbnails()
The typical use is:
YouTube youtube = new YouTube(...);
YouTube.Thumbnails.List request = youtube.thumbnails().list(parameters ...)
public YouTube.VideoCategories videoCategories()
The typical use is:
YouTube youtube = new YouTube(...);
YouTube.VideoCategories.List request = youtube.videoCategories().list(parameters ...)
public YouTube.Videos videos()
The typical use is:
YouTube youtube = new YouTube(...);
YouTube.Videos.List request = youtube.videos().list(parameters ...)