Blah, the $photoEntry should be $albumEntry. I was being lazy there and
re-using some of the example code for working with photos, since albums and
photos are somewhat homogenous in their metadata.

You should be able to perform those operations on "$userEntry" in your code,
since a user feed is by default a feed of album entries.

Cheers,
-Jeff

On Sat, Feb 21, 2009 at 4:23 AM, Mark Young <[email protected]> wrote:

>
> Jeff,
>
> Thanks!  I think I've missed where the best lace to start is...
>
> I'm using this code:
>
> try {
>    $userFeed = $gp->getUserFeed("default");
>    foreach ($userFeed as $userEntry) {
>        echo $userEntry->title->text . "<br />\n";
>    }
> } catch (Zend_Gdata_App_HttpException $e) {
>    echo "Error: " . $e->getMessage() . "<br />\n";
>    if ($e->getResponse() != null) {
>        echo "Body: <br />\n" . $e->getResponse()->getBody() .
>             "<br />\n";
>    }
>    // In new versions of Zend Framework, you also have the option
>    // to print out the request that was made.  As the request
>    // includes Auth credentials, it's not advised to print out
>    // this data unless doing debugging
>    // echo "Request: <br />\n" . $e->getRequest() . "<br />\n";
> } catch (Zend_Gdata_App_Exception $e) {
>    echo "Error: " . $e->getMessage() . "<br />\n";
> }
>
> from
> http://code.google.com/apis/picasaweb/developers_guide_php.html#ListAlbums
> to get my list of albums printed out to the page.  Currently just as a
> UL list.  However, as I'm sure you realise, I want to have these words
> replaced with my selected "Icon" or cover image for the album.  I
> understand you seem to have an array of AlbumEntry objects but I'm not
> sure if I do yet and you also seem to have a variable $photoEntry and
> I'm not sure where this came from?
>
> Can you help?
>
> Thanks,
>
> Mark
>
> 2009/2/20 Jeff Fisher <[email protected]>:
> > Hi Mark,
> >
> > I'm assuming you're iterating over a bunch of AlbumEntry objects:
> >
> >
> http://framework.zend.com/apidoc/core/Zend_Gdata/Photos/Zend_Gdata_Photos_AlbumEntry.html
> >
> > To get the cover you can look at the media:content or the media:thumbnail
> > with something like
> >
> > if ($albumEntry->getMediaGroup()->getContent() != null) {
> >   $mediaContentArray = $photoEntry->getMediaGroup()->getContent();
> >
> >   $contentUrl = $mediaContentArray[0]->getUrl();
> > }
> >
> > if ($albumEntry->getMediaGroup()->getThumbnail() != null) {
> >   $mediaThumbnailArray = $photoEntry->getMediaGroup()->getThumbnail();
> >   $firstThumbnailUrl = $mediaThumbnailArray[0]->getUrl();
> >
> > }
> >
> > Cheers,
> > -Jeff
> >
> > On Mon, Feb 16, 2009 at 2:50 PM, tip2tail <[email protected]> wrote:
> >>
> >> Hi all,
> >>
> >> Fairly confident PHP coder but new to this Zend/GData lark so sorry if
> >> this has been covered before.  I did search for about 30 mins but came
> >> up with diddly squat so far!
> >>
> >> Anyway,  developing my personal site to use the photos as data fed
> >> from PWA and so far have been able to list all albums, all photos in
> >> an album, see the photos etc but I need to get the Album Cover Image
> >> (that appears on the PWA home page for my albums.  I think this is
> >> refered to as the Album Icon in the API but I'm unsure as how to
> >> retrieve this from the Zend feed.
> >>
> >> Anyone able to help?
> >>
> >> Thanks!
> >>
> >> Mark
> >>
> >>
> >
> >
> > >
> >
>
>
>
> --
> Mark Young
> www.tip2tail.co.uk || [email protected]
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Picasa Web Albums API" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/Google-Picasa-Data-API?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to