Read from the package's own PHP files at the commit 034ea6988021: its namespaces, classes, interfaces and enums, their public constants, properties and methods with their PHPDoc, and the options its factories take. Nothing of it is run.
YoutubeFactoryclass"youtube": options key (required: a YouTube Data API v3 key), language (titles and descriptions in this language where the owner translated them: videos.list's hl), api ("https://www.googleapis.com/youtube/v3/").
3 options · 1 method
YoutubeProviderclassYouTube through the YouTube Data API v3 with an API key (public data, no user signed in): videos (videos.list, 50 a call), a search (search.list), a channel by its identifier or @handle (channels.list), its uploads (its uploads playlist, read with playlistItems.list, then videos.list for the whole records), playlists (playlists.list, playlistItems.list), what a channel broadcasts live and has scheduled (search.list's eventType=live or upcoming, then videos.list's liveStreamingDetails). liveBroadcasts.list needs the owner's OAuth: not used.
14 methods
Omnishow\Youtube
YoutubeFactory class
final class YoutubeFactory extends ProviderFactory YoutubeFactory.php:17
"youtube": options key (required: a YouTube Data API v3 key), language (titles and descriptions in this language where the owner translated them: videos.list's hl), api ("https://www.googleapis.com/youtube/v3/").
Options
| Option | Default | |
|---|---|---|
api | 'https://www.googleapis.com/youtube/v3/' | |
language | null | |
key | required |
YoutubeFactory::__construct()
public function __construct(readonly ?HttpClientInterface $http = null)YoutubeProvider class
final class YoutubeProvider implements ProviderInterface, VideoInterface, VideoSearchInterface, ChannelInterface, PlaylistInterface, LiveInterface YoutubeProvider.php:42
YouTube through the YouTube Data API v3 with an API key (public data, no user signed in): videos (videos.list, 50 a call), a search (search.list), a channel by its identifier or @handle (channels.list), its uploads (its uploads playlist, read with playlistItems.list, then videos.list for the whole records), playlists (playlists.list, playlistItems.list), what a channel broadcasts live and has scheduled (search.list's eventType=live or upcoming, then videos.list's liveStreamingDetails). liveBroadcasts.list needs the owner's OAuth: not used.
Quota: each call costs a unit of the project's 10,000 a day, a search one of its "Search Queries" bucket (100 a day by default); live() and schedule() make one search each.
YoutubeProvider::__construct()
public function __construct(readonly JsonClient $json, readonly string $key, readonly string $api = 'https://www.googleapis.com/youtube/v3/', readonly ?string $language = null)YoutubeProvider::getName()
public function getName(): stringYoutubeProvider::getTitle()
public function getTitle(): stringYoutubeProvider::capabilities()
public function capabilities(): CapabilitiesYoutubeProvider::video()
public function video(VideoRef $ref): ?VideoYoutubeProvider::videos()
public function videos(array $refs): arrayYoutubeProvider::searchVideos()
public function searchVideos(VideoQuery $query): PageYoutubeProvider::channel()
public function channel(string $channel): ?ChannelYoutubeProvider::channelVideos()
public function channelVideos(string $channel, ?string $page = null, int $limit = 25): PageYoutubeProvider::playlist()
public function playlist(string $id): ?PlaylistYoutubeProvider::playlists()
public function playlists(string $channel, ?string $page = null, int $limit = 25): PageYoutubeProvider::playlistVideos()
public function playlistVideos(string $id, ?string $page = null, int $limit = 25): PageYoutubeProvider::live()
public function live(string $channel): ?StreamYoutubeProvider::schedule()
public function schedule(string $channel, int $limit = 10): array