You almost had it here. The key is you have to change "entry" in your album url to "feed" if you want the feed of things in the album rather than an entry describing the album:
http://picasaweb.google.com/data/feed/api/user/lev.danielyan/albumid/5266204259381588177 Cheers, -Jeff On Dec 9, 11:30 am, "Lev Danielyan" <[email protected]> wrote: > Thanks, Jeff, > I'm knew to Google APIs, so sorry if I ask stupid questions :) > > So, now I figured out the URL for my album, via the PicasaEntry.Id.Uri > property, and I want to get the photos like this: > > PhotoQuery query = new > PhotoQuery(@"http://picasaweb.google.com/data/entry/api/user/lev.danielyan/albumid... > "); > > PicasaFeed feed = (PicasaFeed)m_service.Query(query); > > foreach (PicasaEntry entry in feed.Entries) > { > listBox2.Items.Add(entry.Title.Text); > > } > > There is only one entry in the Feed entries, and it just represents the > album itself, but not the pics in it. > > What am I doing wrong? > > Lev > > On Tue, Dec 9, 2008 at 11:19 PM, Jeff Fisher (Google) < > > > > [email protected]> wrote: > > > Hi Lev, > > > The trick here is to not use the album names when retrieving the feed. > > The album names in the feed URLs are "canonical" and hence don't match > > 1:1 with the actual name, especially when characters that are not > > valid in a URL are used. The workaround is the use the albumid (found > > inside of <gphoto:id> when listing a feed of albums) instead. > > > The downside to this is you can't use the handy "CreatePicasaUri" > > method because it assumes (wrongly) that you are using an album name > > instead of an ID. > > > So what I'd do if I were you is first retrieve the list of albums for > > yourself: > > >http://picasaweb.google.com/data/feed/api/user/default > > > Find the album you want by it's <title> and then use the value of its > > <gphoto:id> to retrieve the album directly: > > >http://code.google.com/apis/picasaweb/developers_guide_protocol.html#... > > > This link is also found in the album entry with rel='http:// > > schemas.google.com/g/2005#feed'. > > > I filed a bug against the .NET client to take in the AlbumID instead > > in future versions: > > >http://code.google.com/p/google-gdata/issues/detail?id=194 > > > Cheers, > > -Jeff > > > On Dec 9, 10:03 am, Lev Danielyan <[email protected]> wrote: > > > Hi, guys, > > > > I want to access my picasa albums with .Net C# code. If the album name > > > contains no spaces or is in plain English, everything works fine. > > > > But in my case I have e.g. two albums named "Sep 14" and > > > "Лена" (unicode russian), so I try to get the photos out of them: > > > > PhotoQuery query = new PhotoQuery(AlbumQuery.CreatePicasaUri(m_uname, > > > "Sep 14")); > > > and > > > PhotoQuery query = new PhotoQuery(AlbumQuery.CreatePicasaUri(m_uname, > > > "Лена")); > > > > In both cases I get a GDataRequestException with "The remote server > > > returned an error: (404) Not Found." error. > > > > Some further research and debugging showed up the following problems, > > > The album name is being passed to > > > Google.GData.Client.Utilities.UriEncodeUnsafe static method, which > > > eventually calls Uri.HexEscape method for URI unsafe character, so > > > > 1. In case of "Sep 14" album name, I get "Sep%2014" safe string, when > > > I tried to got to "http://picasaweb.google.com/data/feed/api/user/ > > > lev.danielyan/album/Sep%2014?kind=photo" in chrome, I got an error, > > > experimentally I figured out that the URL should be "http:// > > > picasaweb.google.com/data/feed/api/user/lev.danielyan/album/Sep14? > > > kind=photo", with NO space in it. > > > > 2. In case of "Лена" album name, I get the same string, which is > > > considered to be safe, but again "http://picasaweb.google.com/data/ > > > feed/api/user/lev.danielyan/album/Лена?kind=photo" gives a 404, and > > > again, experimentally I figured out that the URL should be "http:// > > > picasaweb.google.com/data/feed/api/user/lev.danielyan/album/rOaALF? > > > kind=photo", which actually doesn't make sense to me at all. > > > > The full code snippet is: > > > > PicasaService m_service = new PicasaService("mytestpicasaapp"); > > > m_service.Credentials = new Google.GData.Client.GDataCredentials > > > (m_uname, m_pass); > > > PhotoQuery query = new PhotoQuery(AlbumQuery.CreatePicasaUri(m_uname, > > > "Sep 14")); > > > //PhotoQuery query = new PhotoQuery(AlbumQuery.CreatePicasaUri > > > (m_uname, "Лена")); > > > PicasaFeed feed = (PicasaFeed)m_service.Query(query); > > > > Please help, I'm totally lost here. > > > > Thanks in advance, > > > Lev > > -- > Best Regards, > Lev Danielyan > > Phone (cell.): +374 93 975557 > Phone (work): +374 10 591829 > Phone (home): +374 10 566701http://www.linkedin.com/in/levdanielyan --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
