8 messages in com.googlegroups.google-picasa-data-apiRe: Get the photo info by the single ...
FromSent OnAttachments
H322 Oct 2007 01:23 
Frank Mantek22 Oct 2007 02:07 
H322 Oct 2007 02:24 
Frank Mantek22 Oct 2007 02:40 
H323 Oct 2007 00:25 
Frank Mantek23 Oct 2007 00:42 
Sven24 Oct 2007 09:49 
H324 Oct 2007 22:57 
Subject:Re: Get the photo info by the single photo feed uri.
From:H3 (doct@gmail.com)
Date:10/22/2007 02:24:19 AM
List:com.googlegroups.google-picasa-data-api

Your code doesn't work.

PicasaFeed class hasn't got the Media property, and i also try to use photo.Entries[0] to return a PicasaEntry, but it returns null. :(

On Oct 22, 5:08 pm, Frank Mantek <fman@gmail.com> wrote:

I think the problem is that a MediaCredit is not a child of a photo, but a child of a MediaGroup element. This code if from the top of my head, but with some VS help, you should be able to make it work:

PicasaFeed photo = (PicasaFeed)myService.Query(feedquery);

MediaGroup media = photo.Media // that property is on the picasaentry parent class if (media != null) { MediaCredit credit = media.Credit; if (credit != null) console.writeline(credit.value); }

}

That should work.

Frank Mantek Google

On Oct 22, 2007, at 10:23 AM, H3 wrote:

i get a photo info by a photo uri like "http://picasaweb.google.com/ data/feed/api/user/<userid>/albumid/<albumid>/photoid/<photoid>",

The server can return the full xml for me, but the api has some problem, it just can obtains the elements which without namespace like id, title, etc.

Others elements with namespace media, the api doesn't give me any result.

Here is my code(i'm using .net api library):

string photoStr = "http://picasaweb.google.com/data/feed/api/user/ <userid>/albumid/<albumid>/photoid/<photoid>";

FeedQuery feedquery = new FeedQuery(photoStr);

// AtomFeed photo = myService.Query(feedquery); <--doesn't work,too PicasaFeed photo = (PicasaFeed)myService.Query(feedquery);

// Output nothing Console.WriteLine(photo.FindExtension (MediaRssNameTable.MediaRssCredit, MediaRssNameTable.NSMediaRss));

// Output 0 Console.WriteLine(photo.FindExtensions (MediaRssNameTable.MediaRssThumbnail, MediaRssNameTable.NSMediaRss).Count);