Picasa Pagination

3 messages Options
Embed this post
Permalink
kwylez

Picasa Pagination

Reply Threaded More More options
Print post
Permalink
Has anyone had any luck with using pagination utilizing Picasa API? I am at a loss as to find the most efficient way to handle this.

I am able to retrieve all my albums/photos, but I would like to page through the photos so that web clients don't have to download 200+ pictures at a time.

Thanks,
Cory
Ryan Boyd-3

Re: Picasa Pagination

Reply Threaded More More options
Print post
Permalink
Hi Cory,

We're actually trying to make this slightly easier.  In the meantime, take a look at the code below:

Cheers,
-Ryan



// Let's say you have a feed of photos called $feed (probably a Zend_Gdata_Photos_AlbumFeed):
$previousLink = $feed->getLink("previous");
$nextLink = $feed->getLink("next");

if ($previousLink !== null) {
  echo "previous url: " . $previousLink->href . "<br />";
  // $photos is an instance of Zend_Gdata_Photos
  $previousFeed = $photos->getAlbumFeed($previousLink->href);
}
if ($nextLink !== null) {
  echo "next url: " . $nextLink->href . "<br />";
  //$photos is an instance of Zend_Gdata_Photos
  $nextFeed  = $photos->getAlbumFeed($nextLink->href);
}

On Dec 7, 2007 7:50 PM, kwylez <[hidden email]> wrote:

Has anyone had any luck with using pagination utilizing Picasa API? I am at a
loss as to find the most efficient way to handle this.

I am able to retrieve all my albums/photos, but I would like to page through
the photos so that web clients don't have to download 200+ pictures at a
time.

Thanks,
Cory
--
View this message in context: http://www.nabble.com/Picasa-Pagination-tf4965828s16154.html#a14225183
Sent from the Zend gdata mailing list archive at Nabble.com.


kwylez

Re: Picasa Pagination

Reply Threaded More More options
Print post
Permalink
Ryan,
  Thanks for the code example.  I will be looking at this today.

-Cory

On Dec 8, 2007 6:40 PM, Ryan Boyd <[hidden email]> wrote:
Hi Cory,

We're actually trying to make this slightly easier.  In the meantime, take a look at the code below:

Cheers,
-Ryan



// Let's say you have a feed of photos called $feed (probably a Zend_Gdata_Photos_AlbumFeed):
$previousLink = $feed->getLink("previous");
$nextLink = $feed->getLink("next");

if ($previousLink !== null) {
  echo "previous url: " . $previousLink->href . "<br />";
  // $photos is an instance of Zend_Gdata_Photos
  $previousFeed = $photos->getAlbumFeed($previousLink->href);
}
if ($nextLink !== null) {
  echo "next url: " . $nextLink->href . "<br />";
  //$photos is an instance of Zend_Gdata_Photos
  $nextFeed  = $photos->getAlbumFeed($nextLink->href);
}

On Dec 7, 2007 7:50 PM, kwylez <[hidden email]> wrote:

Has anyone had any luck with using pagination utilizing Picasa API? I am at a
loss as to find the most efficient way to handle this.

I am able to retrieve all my albums/photos, but I would like to page through
the photos so that web clients don't have to download 200+ pictures at a
time.

Thanks,
Cory
--
View this message in context: http://www.nabble.com/Picasa-Pagination-tf4965828s16154.html#a14225183
Sent from the Zend gdata mailing list archive at Nabble.com.





--
Cory Wiles
[hidden email]
http://www.corywiles.com