Zend Framework 101: Zend_Gdata_YouTube
The Zend Framework contains a number of APIs for accessing Google services, including YouTube. In this article I will show you how to retrieve a feed of videos from YouTube using the
Zend_Gdata_YouTube class within Zend_Gdata.
There are a number of different feeds available, and different types of data available in each feed. For instance, some data is only available if you connect to the service with your developer tokens.
To simplify things in this article, we're going to use the service to retrieve videos for a specific user, and we're going to do so using anonymous authentication. You can refer to the developer guide (linked below) for details on other types of queries that can be performed.
In this article we will cover the following:
- Retrieve a list of videos for a given username
- Loop over the videos and output details of each
- Use an advanced query to split results up into pages
This article requires Zend Framework, downloadable from http://framework.zend.com. At time of writing, the current version of Zend Framework is 1.10.5.
In addition to this article, you can find out about the Zend_Gdata_YouTube component from Zend Framework developer guide.