<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Application programming interface &#8211; stoimen&#039;s web log</title>
	<atom:link href="/tag/application-programming-interface/feed/" rel="self" type="application/rss+xml" />
	<link></link>
	<description>on web development</description>
	<lastBuildDate>Tue, 13 Feb 2018 08:18:15 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=5.0.3</generator>
	<item>
		<title>Retrieving YouTube Channel&#8217;s Videos with Zend_Gdata_YouTube</title>
		<link>/2010/03/16/retrieving-youtube-channels-videos-with-zend_gdata_youtube/</link>
		<comments>/2010/03/16/retrieving-youtube-channels-videos-with-zend_gdata_youtube/#comments</comments>
		<pubDate>Tue, 16 Mar 2010 11:53:32 +0000</pubDate>
		<dc:creator><![CDATA[Stoimen]]></dc:creator>
				<category><![CDATA[micro tutorial]]></category>
		<category><![CDATA[snippets]]></category>
		<category><![CDATA[zend framework]]></category>
		<category><![CDATA[API]]></category>
		<category><![CDATA[Application programming interface]]></category>
		<category><![CDATA[Atom]]></category>
		<category><![CDATA[Computing]]></category>
		<category><![CDATA[GData]]></category>
		<category><![CDATA[Google Inc.]]></category>
		<category><![CDATA[http]]></category>
		<category><![CDATA[PHP programming language]]></category>
		<category><![CDATA[RSS]]></category>
		<category><![CDATA[Technology/Internet]]></category>
		<category><![CDATA[Web 2.0]]></category>
		<category><![CDATA[Web application frameworks]]></category>
		<category><![CDATA[World Wide Web]]></category>
		<category><![CDATA[YouTube Inc]]></category>

		<guid isPermaLink="false">/?p=1329</guid>
		<description><![CDATA[Zend_Gdata Zend Framework gives you the possibility to interact with Gdata services, which are provided by most of the Goolge services. You can find more on the docs page of Zend_Gdata. The basic principle is that you can connect a service with you API key, given by Google. What I&#8217;m about to show you is &#8230; <a href="/2010/03/16/retrieving-youtube-channels-videos-with-zend_gdata_youtube/" class="more-link">Continue reading <span class="screen-reader-text">Retrieving YouTube Channel&#8217;s Videos with Zend_Gdata_YouTube</span> <span class="meta-nav">&#8594;</span></a><div class='yarpp-related-rss'>

Related posts:<ol>
<li><a href="/2010/05/21/check-youtube-video-existence-with-zend_gdata_youtube/" rel="bookmark" title="Check YouTube Video Existence with Zend_Gdata_YouTube">Check YouTube Video Existence with Zend_Gdata_YouTube </a></li>
<li><a href="/2010/04/22/iterate-over-youtube-channel-with-zend_gdata_youtube/" rel="bookmark" title="Iterate over YouTube Channel with Zend_Gdata_YouTube">Iterate over YouTube Channel with Zend_Gdata_YouTube </a></li>
<li><a href="/2011/04/13/post-with-zend_http_client/" rel="bookmark" title="POST with Zend_Http_Client">POST with Zend_Http_Client </a></li>
<li><a href="/2010/06/28/send-authenticated-post-request-with-zend_http_client/" rel="bookmark" title="Send Authenticated POST Request with Zend_Http_Client">Send Authenticated POST Request with Zend_Http_Client </a></li>
</ol>
</div>
]]></description>
				<content:encoded><![CDATA[<h2>Zend_Gdata</h2>
<p><a title="Zend Framework" href="http://framework.zend.com/" target="_blank">Zend Framework</a> gives you the possibility to interact with <a title="gdata" href="http://code.google.com/apis/gdata/" target="_blank">Gdata</a> services, which are provided by most of the Goolge services. You can find more on the docs page of <a href="http://framework.zend.com/manual/en/zend.gdata.html" target="_blank">Zend_Gdata</a>. The basic principle is that you can connect a service with you API key, given by Google. What I&#8217;m about to show you is how do connect such a service.</p>
<p>In theory Zend_Gdata depends on <a title="Zend_Http_Client" href="http://framework.zend.com/manual/en/zend.http.html" target="_blank">Zend_Http_Client</a> and you&#8217;ve to connect it with an instance of this class.</p>
<pre lang="php">// 1. setup API key
$apiKey = 'your_api_key_here';

// 2. retrieve videos via GData Atom
$client = new Zend_Http_Client();
$gdata = new Zend_Gdata_YouTube(null, 'my-app', null, $apiKey);</pre>
<p>Note that you&#8217;ve to replace your API key in the chunk above.</p>
<p>Now once that you&#8217;ve connected the YouTube service you can iterate through the entries from the video feed.</p>
<pre lang="php">$videoFeed = $gdata->getUserUploads('username');
foreach ($videoFeed as $entry) {
    echo $entry->getTitle();
}</pre>
<p>The thing is that you can modify a bit the code above. As ZF docs says if you don&#8217;t setup a Zend_Http_Client a default with default configuration, so you can omit this and simple write:</p>
<pre lang="php">// 1. setup API key
$apiKey = 'your_api_key_here';

// 2. retrieve videos via GData Atom
$gdata = new Zend_Gdata_YouTube(null, 'my-app', null, $apiKey);</pre>
<div class='yarpp-related-rss'>
<p>Related posts:<ol>
<li><a href="/2010/05/21/check-youtube-video-existence-with-zend_gdata_youtube/" rel="bookmark" title="Check YouTube Video Existence with Zend_Gdata_YouTube">Check YouTube Video Existence with Zend_Gdata_YouTube </a></li>
<li><a href="/2010/04/22/iterate-over-youtube-channel-with-zend_gdata_youtube/" rel="bookmark" title="Iterate over YouTube Channel with Zend_Gdata_YouTube">Iterate over YouTube Channel with Zend_Gdata_YouTube </a></li>
<li><a href="/2011/04/13/post-with-zend_http_client/" rel="bookmark" title="POST with Zend_Http_Client">POST with Zend_Http_Client </a></li>
<li><a href="/2010/06/28/send-authenticated-post-request-with-zend_http_client/" rel="bookmark" title="Send Authenticated POST Request with Zend_Http_Client">Send Authenticated POST Request with Zend_Http_Client </a></li>
</ol></p>
</div>
]]></content:encoded>
			<wfw:commentRss>/2010/03/16/retrieving-youtube-channels-videos-with-zend_gdata_youtube/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
	</channel>
</rss>
