Пример #1
0
 /**
  * Retreive feed object containing entries for the user's documents.
  *
  * @param mixed $location The location for the feed, as a URL or Query
  * @return \Zend\GData\Docs\DocumentListFeed
  */
 public function getDocumentListFeed($location = null)
 {
     if ($location === null) {
         $uri = self::DOCUMENTS_LIST_FEED_URI;
     } elseif ($location instanceof Query) {
         $uri = $location->getQueryUrl();
     } else {
         $uri = $location;
     }
     return parent::getFeed($uri, 'Zend\\GData\\Docs\\DocumentListFeed');
 }
Пример #2
0
 /**
  * Retrieve feed object
  *
  * @return \ZendGData\Calendar\ListFeed
  */
 public function getCalendarListFeed()
 {
     $uri = self::CALENDAR_FEED_URI . '/default';
     return parent::getFeed($uri, 'ZendGData\\Calendar\\ListFeed');
 }
Пример #3
0
 /**
  * Retreive EmailListRecipientFeed object containing multiple
  * EmailListRecipientEntry objects.
  *
  * @param mixed $location The location for the feed, as a URL or Query.
  * @return GApps\EmailListRecipientFeed
  * @throws App\Exception
  * @throws App\HttpException
  * @throws GApps\ServiceException
  */
 public function getEmailListRecipientFeed($location)
 {
     if ($location === null) {
         throw new App\InvalidArgumentException('Location must not be null');
     } elseif ($location instanceof Query) {
         $uri = $location->getQueryUrl();
     } else {
         $uri = $location;
     }
     return parent::getFeed($uri, 'ZendGData\\GApps\\EmailListRecipientFeed');
 }
Пример #4
0
 /**
  * Retrieves a feed of volumes, by default the User annotation feed
  *
  * @param \Zend\GData\Query|string|null $location (optional) The URL to
  *        query.
  * @return \Zend\GData\Books\VolumeFeed The feed of volumes found at the
  *         specified URL.
  */
 public function getUserAnnotationFeed($location = null)
 {
     if ($location == null) {
         $uri = self::MY_ANNOTATION_FEED_URI;
     } else {
         $uri = $location;
     }
     return parent::getFeed($uri, 'Zend\\GData\\Books\\VolumeFeed');
 }
Пример #5
0
 /**
  * Retreive PhotoFeed object containing comments and tags associated
  * with a given photo.
  *
  * @param mixed $location (optional) The location for the feed, as a URL
  *          or Query. If not specified, the community search feed will
  *          be returned instead.
  * @return \ZendGData\Photos\PhotoFeed
  * @throws \ZendGData\App\Exception
  * @throws \ZendGData\App\HttpException
  */
 public function getPhotoFeed($location = null)
 {
     if ($location === null) {
         $uri = self::PICASA_BASE_FEED_URI . '/' . self::DEFAULT_PROJECTION . '/' . self::COMMUNITY_SEARCH_PATH;
     } elseif ($location instanceof Photos\UserQuery) {
         $location->setType('feed');
         $uri = $location->getQueryUrl();
     } elseif ($location instanceof Query) {
         $uri = $location->getQueryUrl();
     } else {
         $uri = $location;
     }
     return parent::getFeed($uri, 'ZendGData\\Photos\\PhotoFeed');
 }
Пример #6
0
 /**
  * Gets a list feed.
  *
  * @param mixed $location A ListQuery, WorksheetEntry or string URI specifying the feed location.
  * @return ListFeed
  */
 public function getListFeed($location)
 {
     if ($location instanceof Spreadsheets\ListQuery) {
         $uri = $location->getQueryUrl();
     } else {
         if ($location instanceof Spreadsheets\WorksheetEntry) {
             $uri = $location->getLink(self::LIST_FEED_LINK_URI)->href;
         } else {
             $uri = $location;
         }
     }
     return parent::getFeed($uri, 'Zend\\GData\\Spreadsheets\\ListFeed');
 }
Пример #7
0
 /**
  * Retrieve feed object
  *
  * @param mixed $location The location for the feed, as a URL or Query
  * @return \Zend\GData\GBase\SnippetFeed
  */
 public function getGBaseSnippetFeed($location = null)
 {
     if ($location === null) {
         $uri = self::GBASE_SNIPPET_FEED_URI;
     } else if ($location instanceof Query) {
         $uri = $location->getQueryUrl();
     } else {
         $uri = $location;
     }
     return parent::getFeed($uri, 'Zend\GData\GBase\SnippetFeed');
 }
Пример #8
0
 /**
  * Retrieve a user's profile as a feed object.  If ClientLogin is used, the
  * profile associated with $this->_profileID is returned, otherwise
  * the profile associated with the AuthSub token is read.
  *
  * @param mixed $query The query for the feed, as a URL or Query
  * @return \Zend\GData\Health\ProfileFeed
  */
 public function getHealthProfileFeed($query = null)
 {
     if ($this->_httpClient->getClientLoginToken() !== null && $this->getProfileID() == null) {
         throw new App\AuthException('Profile ID must not be null. Did you call setProfileID()?');
     }
     if ($query instanceof Query) {
         $uri = $query->getQueryUrl();
     } else {
         if ($this->_httpClient->getClientLoginToken() !== null && $query == null) {
             $uri = self::CLIENTLOGIN_PROFILE_FEED_URI . '/' . $this->getProfileID();
         } else {
             if ($query === null) {
                 $uri = self::AUTHSUB_PROFILE_FEED_URI;
             } else {
                 $uri = $query;
             }
         }
     }
     // use correct feed for /h9 or /health
     if ($this->_useH9Sandbox) {
         $uri = preg_replace('/\\/health\\//', '/h9/', $uri);
     }
     return parent::getFeed($uri, 'Zend\\GData\\Health\\ProfileFeed');
 }