This is article 5 of the YouTube API With PHP series.
We now start with the core YouTube API which is the Data API. It is likely that most of your work with the YouTube API will center around this API. We will first look at what resources you can work with in the Data API.
A resource is a YouTube entity which the Data API exposes. Think of it as a class defined in a framework. If we had been using the official PHP API library for YouTube you would have used the relevant classes for each of the resources given below. But since we will use the simpler and more straightforward REST API calls directly each of these resources becomes a component in the REST request URL.
An activity pertains to an action performed either by a User or a Channel. Activities include the following:
- Bulletin announcements
- Any additions to a Channel
- Marking a video as Favorite
- Liking a Video
- Adding an item to a Playlist
- Promoting a Video thru advertising
- A Video is recommended
- A Video is posted on a social network
- Subscribing to a Channel
- Uploading a Video
Any data or action concerning YouTube channels.
Working with the banner image of a Channel
Any group of videos in a channel which is highlighted as a section like Recently Upload or Most Popular etc.
Work with the internal categorisation of YouTube channels, by YouTube so that content can be found easily and in an organized manner.
Any supported language that can be displayed on the YouTube website.
Regions that a YouTube user can set as the preferred geographical region from which content will be displayed.
Grouping of videos done by YouTube users, which can be viewed by others.
A single video item in a playlist.
Search results containing videos and playlists or channels.
Handling user subscriptions to a channel and the automatic notifications that subscribers get from the channel.
Image resources associated with a video.
Any YouTube video.
Categorisation of uploaded videos.
Management of watermark images to appear on videos.