* Add album query
authorMichael J. Rubinsky <mrubinsk@horde.org>
Sun, 28 Dec 2008 23:16:05 +0000 (18:16 -0500)
committerMichael J. Rubinsky <mrubinsk@horde.org>
Sun, 28 Dec 2008 23:16:05 +0000 (18:16 -0500)
* Update example file

framework/Service_Vimeo/doc/vimeo_example.php
framework/Service_Vimeo/lib/Horde/Service/Vimeo/Simple.php

index ebce6f7..09f8693 100644 (file)
@@ -1,17 +1,20 @@
 <?php
-
-// require_once /var/www/html/horde/horde-hatchery/service/lib/VimeoSimple.php';
-
 require_once 'Horde/Autoloader.php';
-$v = new Service_VimeoSimple();
+$v = Horde_Service_Vimeo::factory('Simple');
 
 // Get the list of all user videos
-$results = unserialize($v->getClips(array('userClips' => 'user1015172')));
+$results = unserialize($v->user('user1015172')->clips()->run());
 
-// Get first video to embed
-$latest = $results[0]; 
+// Get the list of all clips in a group
+$results = unserialize($v->group('bestof08')->clips()->run());
 
-// Get the code to embed it
+// List of all clips in a channel
+$results = unserialize($v->channel('theedit')->clips()->run());
+
+// List of clips in an album
+$results = unserialize($v->album('52803')->clips()->run());
+
+// Get first video to embed
 $embed = $v->getEmbedJSON($latest['url']);
 
 // Decode the data and print out the HTML
index bd83847..cefa3f4 100644 (file)
@@ -74,6 +74,9 @@ class Horde_Service_Vimeo_Request {
             case 'channel':
                 $this->_identifier = '/channel/' . $args['identifier'];
                 break;
+            case 'album':
+                $this->_identifier = '/album/' . $args['identifier'];
+                break;
             }
         }
     }