Esempio n. 1
0
 /**
  * Retrieve a feed of messages in the currently authenticated user's inbox.
  *
  * @throws Zend_Gdata_App_Exception if not logged in.
  * @return Zend_Gdata_YouTube_InboxFeed|null
  */
 public function getInboxFeedForCurrentUser()
 {
     if (!$this->isAuthenticated()) {
         require_once 'Zend/Gdata/App/Exception.php';
         throw new Zend_Gdata_App_Exception('You must be authenticated to ' . 'use the getInboxFeedForCurrentUser function in Zend_' . 'Gdata_YouTube.');
     }
     return parent::getFeed(self::INBOX_FEED_URI, 'Zend_Gdata_YouTube_InboxFeed');
 }
Esempio n. 2
0
 /**
  * Retrieves a user's profile as an entry 
  *
  * @param string $user (optional) The username of interest
  * @param mixed $location (optional) The URL to query or a
  *         Zend_Gdata_Query object from which a URL can be determined
  * @return Zend_Gdata_YouTube_UserProfileEntry The user profile entry
  */
 public function getUserProfile($user = null, $location = null)
 {
     if ($user !== null) {
         $uri = 'http://gdata.youtube.com/feeds/users/' . $user;
     } else {
         if ($location instanceof Zend_Gdata_Query) {
             $uri = $location->getQueryUrl();
         } else {
             $uri = $location;
         }
     }
     return parent::getEntry($uri, 'Zend_Gdata_YouTube_UserProfileEntry');
 }
Esempio n. 3
0
 /**
  * Retrieve the activity of the currently authenticated users friend.
  *
  * @throws Zend_Gdata_App_Exception if not logged in.
  * @return Zend_Gdata_YouTube_ActivityFeed
  */
 public function getFriendActivityForCurrentUser()
 {
     if (!$this->isAuthenticated()) {
         require_once 'Zend/Gdata/YouTube/App/Exception.php';
         throw new Zend_Gdata_App_Exception('You must be authenticated to ' . 'use the getFriendActivityForCurrentUser function in Zend_' . 'Gdata_YouTube.');
     }
     return parent::getFeed(self::FRIEND_ACTIVITY_FEED_URI, 'Zend_Gdata_YouTube_ActivityFeed');
 }
Esempio n. 4
0
 /**
  * Retrieves a user's profile as an entry
  *
  * @param string $user (optional) The username of interest
  * @param mixed $location (optional) The URL to query or a
  *         Zend_Gdata_Query object from which a URL can be determined
  * @return Zend_Gdata_YouTube_UserProfileEntry The user profile entry
  */
 public function getUserProfile($user = null, $location = null)
 {
     if ($user !== null) {
         $uri = self::USER_URI . '/' . $user;
     } else {
         if ($location instanceof Zend_Gdata_Query) {
             $uri = $location->getQueryUrl();
         } else {
             $uri = $location;
         }
     }
     return parent::getEntry($uri, 'Zend_Gdata_YouTube_UserProfileEntry');
 }