Jeff,

Thanks for your help, with using your url it works like a charm.

I only have one question left, is it possible to create the url  from 
the PicasaQuery object or another query/urlbuilder object? It isn't 
really important, I just try to remove all urls as string from my code, 
so I only have real objects in my code.

Regards,
Erwin

Jeff Fisher wrote:
> Well you are retrieving the feed of the photo, which could have 
> comments or tags of the photo as entries. What you really want is to 
> just fetch the entry of the photo itself:
>
> http://picasaweb.google.com/data/entry/api/user/berends.erwin/albumid/5208110958805548257/photoid/5208111899403386114
>
> Notice it is /data/entry/ instead of /data/feed/
>
> You can retrieve it using something like:
>
> PicasaEntry entry = (PicasaEntry) service.Get(photoUrl);
>
> Cheers,
> -Jeff
>
>
>
> On Mon, Feb 2, 2009 at 12:04 PM, Erwin Berends 
> <[email protected] <mailto:[email protected]>> wrote:
>
>
>     Hi,
>
>     I'm trying to select a single photo from an album with this code:
>
>     In the code, PicasaPhoto is my own wrapper object for the PicasaEntry,
>     it contains a PhotoAccessor and a PicasaEntry, but it isn't really
>     relevant for the issue I'm having.
>
>     public PicasaPhoto GetPhoto(string albumId, string photoId)
>            {
>                PicasaQuery query = new PicasaQuery
>     (PicasaQuery.CreatePicasaUri(this._user, albumId, photoId));
>                this._picasaFeed = (PicasaFeed)this._picasaService.Query
>     (query);
>                //the next statement breaks, there are no entries...
>                PicasaEntry photoentry = (PicasaEntry)
>     this._picasaFeed.Entries[0];
>                return new PicasaPhoto(photoentry);
>            }
>
>     When I look at the feed-url it is:
>     
> http://picasaweb.google.com/data/feed/api/user/berends.erwin/albumid/5208110958805548257/photoid/5208111899403386114,
>     putting this in a browser, it shows me the name of my image, but the
>     picasafeed doesn't return any results, or maybe it does and I do
>     something wrong.
>
>     Does anybody know how to retrieve a single photo with the query and
>     feed-objects from the api? I know there are other ways, but this way
>     my code stays clear to everybody who reads it.
>
>
>
>
>
>
> >


--~--~---------~--~----~------------~-------~--~----~
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