cvs: peardoc /en/package/webservices/services-youtube example.xml

From: Date: Thu, 28 Sep 2006 22:36:16 +0000
Subject: cvs: peardoc /en/package/webservices/services-youtube example.xml
Groups: php.pear.doc 
Request: Send a blank email to pear-doc+get-8547@lists.php.net to get a copy of this message
shin Thu Sep 28 22:36:16 2006 UTC Modified files: /peardoc/en/package/webservices/services-youtube example.xml Log: Removed the leading whitespace inside the <programlisting> tags http://cvs.php.net/viewvc.cgi/peardoc/en/package/webservices/services-youtube/example.xml?r1=1.3&r2=1.4&diff_format=u Index: peardoc/en/package/webservices/services-youtube/example.xml diff -u peardoc/en/package/webservices/services-youtube/example.xml:1.3 peardoc/en/package/webservices/services-youtube/example.xml:1.4 --- peardoc/en/package/webservices/services-youtube/example.xml:1.3 Thu Sep 28 22:25:14 2006 +++ peardoc/en/package/webservices/services-youtube/example.xml Thu Sep 28 22:36:16 2006 @@ -1,4 +1,4 @@ -<!-- $Revision: 1.3 $ --> +<!-- $Revision: 1.4 $ --> <refentry id="package.webservices.services-youtube.example"> <refnamediv> <refname>Example</refname> @@ -15,12 +15,12 @@ <programlisting role="php"> <![CDATA[require_once 'Services/YouTube.php'; - $dev_id = "YOUR_DEV_ID"; - $user_id = "USER_ID"; - $youtube = new Services_YouTube($dev_id, array('usesCache' => true)); - $user = $youtube->getProfile($user_id); - $profile = $user->user_profile; - print "{$profile->first_name} {$profile->last_name} :({$profile->video_watch_count} Wathced.)\n"; +$dev_id = "YOUR_DEV_ID"; +$user_id = "USER_ID"; +$youtube = new Services_YouTube($dev_id, array('usesCache' => true)); +$user = $youtube->getProfile($user_id); +$profile = $user->user_profile; +print "{$profile->first_name} {$profile->last_name} :({$profile->video_watch_count} Wathced.)\n"; ]]> </programlisting> </example> @@ -30,14 +30,14 @@ <programlisting role="php"> <![CDATA[require_once 'Services/YouTube.php'; - $dev_id = "YOUR_DEV_ID"; - $user_id = "USER_ID"; - $youtube = new Services_YouTube($dev_id, array('usesCache' => true)); - $videos = $youtube->listFavoriteVideos($user_id); - foreach ($videos->xpath('//video') as $i => $video) { - print "<img src='{$video->thumbnail_url}' alt='{$video->title}' />\n"; - print "<a href='{$video->url}'>URL</a><br />\n"; - } +$dev_id = "YOUR_DEV_ID"; +$user_id = "USER_ID"; +$youtube = new Services_YouTube($dev_id, array('usesCache' => true)); +$videos = $youtube->listFavoriteVideos($user_id); +foreach ($videos->xpath('//video') as $i => $video) { + print "<img src='{$video->thumbnail_url}' alt='{$video->title}' />\n"; + print "<a href='{$video->url}'>URL</a><br />\n"; +} ]]> </programlisting> </example> @@ -47,13 +47,13 @@ <programlisting role="php"> <![CDATA[require_once 'Services/YouTube.php'; - $dev_id = "YOUR_DEV_ID"; - $user_id = "USER_ID"; - $youtube = new Services_YouTube($dev_id, array('usesCache' => true)); - $users = $youtube->listFriends($user_id); - foreach ($users->xpath('//friend') as $i => $friend) { - print "{$friend->user} : Upload: {$friend->video_upload_count}"; - } +$dev_id = "YOUR_DEV_ID"; +$user_id = "USER_ID"; +$youtube = new Services_YouTube($dev_id, array('usesCache' => true)); +$users = $youtube->listFriends($user_id); +foreach ($users->xpath('//friend') as $i => $friend) { + print "{$friend->user} : Upload: {$friend->video_upload_count}"; +} ]]> </programlisting> </example> @@ -63,14 +63,14 @@ <programlisting role="php"> <![CDATA[require_once 'Services/YouTube.php'; - $dev_id = "YOUR_DEV_ID"; - $tag = "test"; - $youtube = new Services_YouTube($dev_id, array('usesCache' => true)); - $videos = $youtube->listByTag($tag); - foreach ($videos->xpath('//video') as $i => $video) { - print "<img src='{$video->thumbnail_url}' alt='{$video->title}' />\n"; - print "<a href='{$video->url}'>URL</a><br />\n"; - } +$dev_id = "YOUR_DEV_ID"; +$tag = "test"; +$youtube = new Services_YouTube($dev_id, array('usesCache' => true)); +$videos = $youtube->listByTag($tag); +foreach ($videos->xpath('//video') as $i => $video) { + print "<img src='{$video->thumbnail_url}' alt='{$video->title}' />\n"; + print "<a href='{$video->url}'>URL</a><br />\n"; +} ]]> </programlisting> </example> @@ -80,14 +80,14 @@ <programlisting role="php"> <![CDATA[require_once 'Services/YouTube.php'; - $dev_id = "YOUR_DEV_ID"; - $user_id = "USER_ID"; - $youtube = new Services_YouTube($dev_id, array('usesCache' => true)); - $videos = $youtube->listByUser($user_id); - foreach ($videos->xpath('//video') as $i => $video) { - print "<img src='{$video->thumbnail_url}' alt='{$video->title}' />\n"; - print "<a href='{$video->url}'>URL</a><br />\n"; - } +$dev_id = "YOUR_DEV_ID"; +$user_id = "USER_ID"; +$youtube = new Services_YouTube($dev_id, array('usesCache' => true)); +$videos = $youtube->listByUser($user_id); +foreach ($videos->xpath('//video') as $i => $video) { + print "<img src='{$video->thumbnail_url}' alt='{$video->title}' />\n"; + print "<a href='{$video->url}'>URL</a><br />\n"; +} ]]> </programlisting> </example> @@ -97,13 +97,13 @@ <programlisting role="php"> <![CDATA[require_once 'Services/YouTube.php'; - $dev_id = "YOUR_DEV_ID"; - $youtube = new Services_YouTube($dev_id, array('usesCache' => true)); - $videos = $youtube->listFeatured(); - foreach ($videos->xpath('//video') as $i => $video) { - print "<img src='{$video->thumbnail_url}' alt='{$video->title}' />\n"; - print "<a href='{$video->url}'>URL</a><br />\n"; - } +$dev_id = "YOUR_DEV_ID"; +$youtube = new Services_YouTube($dev_id, array('usesCache' => true)); +$videos = $youtube->listFeatured(); +foreach ($videos->xpath('//video') as $i => $video) { + print "<img src='{$video->thumbnail_url}' alt='{$video->title}' />\n"; + print "<a href='{$video->url}'>URL</a><br />\n"; +} ]]> </programlisting> </example> @@ -113,16 +113,16 @@ <programlisting role="php"> <![CDATA[require_once 'Services/YouTube.php'; - $dev_id = "YOUR_DEV_ID"; - $video_id = "VIDEO_ID"; - $youtube = new Services_YouTube($dev_id, array('usesCache' => true)); - $video = $youtube->getDetails($video_id); - $details = $video->video_details; - print "{$details->title} : ({$details->tags}) : RATE: {$details->rating_avg} in {$detials->rating_count}"; - print "<img src='{$details->thumbnail_url}' alt={$details->title}><hr /><hr />"; - foreach ($details->xpath('//comment') as $i => $comment) { - print "{$comment->author} : {$comment->text}<hr />"; - } +$dev_id = "YOUR_DEV_ID"; +$video_id = "VIDEO_ID"; +$youtube = new Services_YouTube($dev_id, array('usesCache' => true)); +$video = $youtube->getDetails($video_id); +$details = $video->video_details; +print "{$details->title} : ({$details->tags}) : RATE: {$details->rating_avg} in {$detials->rating_count}"; +print "<img src='{$details->thumbnail_url}' alt={$details->title}><hr /><hr />"; +foreach ($details->xpath('//comment') as $i => $comment) { + print "{$comment->author} : {$comment->text}<hr />"; +} ]]> </programlisting> </example> @@ -147,5 +147,5 @@ vim600: syn=webservices fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 ---> +-->

« previous php.pear.doc (#8547) next »