5 messages in com.googlegroups.google-picasa-data-api[PWA API] Re: Find photo by name| From | Sent On | Attachments |
|---|---|---|
| VanTurenhout | 11 Jul 2008 02:08 | |
| VanTurenhout | 11 Jul 2008 03:03 | |
| Jeff Fisher (Google) | 11 Jul 2008 15:46 | |
| VanTurenhout | 13 Jul 2008 22:37 | |
| Jeff Fisher (Google) | 14 Jul 2008 14:40 |
| Subject: | [PWA API] Re: Find photo by name![]() |
|---|---|
| From: | Jeff Fisher (Google) (api....@google.com) |
| Date: | 07/14/2008 02:40:36 PM |
| List: | com.googlegroups.google-picasa-data-api |
There isn't the ability to query by original filename in the API, so I think that's probably the only way you can implement such a thing.
Cheers, -Jeff
On Jul 13, 10:37 pm, VanTurenhout <VanT...@gmail.com> wrote:
Hi Jeff,
That is what i figured out, yes. But that's not the thing I looked for. I want to get the ID as one of the properties, after I found the photo by it's name.
Here's the thing: I have a database, with all kind's of paintings in it. One of the properties is it's picture-s name (only the name, not the picture itself). That corresponds to the filename in Picasa. So, I wrote a web-page, that can show all the information about the paintings, and, for the picture, I want to use the Google API to get the picture from the Picasa Album. Therefore, I need to have a method to search for the filename in Picasa, and then display it.
In the meantime, I found a way:
public string GetIdFromTitle(string title) { myService = new PicasaService("Service"); PhotoQuery q = new PhotoQuery(PicasaQuery.CreatePicasaUri("AlbumName")); PicasaFeed fd = myService.Query(q); PhotoAccessor ac1; string result = string.Empty; foreach (PicasaEntry et in fd.Entries) { if (et.Title.Text == title) { ac1 = new PhotoAccessor(et); result = ac1.Id; } } return result; }
But maybe there's more efficient way to do that.
Rob
On Jul 12, 12:46 am, "Jeff Fisher (Google)" <api....@google.com> wrote:
Hi Rob,
If you know the username, the albumname, and the photoID you can retrieve the photo like so:
PicasaQuery.CreatePicasaUri(username, albumname, photoid)
To get the photo ID on a photo entry you can use something like:
PhotoAccessor ac = new PhotoAccessor(entry); string photoId = ac.Id;
Cheers, -Jeff
On Jul 11, 3:03 am, VanTurenhout <VanT...@gmail.com> wrote:
Hi,
I use this method to find a photo by tag, but I need to have a method to find a photo by it's filename (so I can get the ID and display it)
myService = new PicasaService("foo"); PhotoQuery q = new PhotoQuery(PicasaQuery.CreatePicasaUri("albumname")); q.Tags = "foo, bar" PicasaFeed fd = myService.Query(q); string result = string.Empty; foreach(PicasaEntry et in fd.Entries) { result = et.Title.Text; } return result;
Can anybody help me with that?
Rob- Hide quoted text -
- Show quoted text -
--~--~---------~--~----~------------~-------~--~----~
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 Goog...@googlegroups.com
To unsubscribe from this group, send email to
Goog...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/Google-Picasa-Data-API?hl=en
-~----------~----~----~----~------~----~------~--~---




