PicasaWeb API - source enthusiasm

Sunday, October 11, 2009

PicasaWeb API

Trying Google Picasa API. The API is not working correctly. The official example of getting all albums doesn't work. URL feedUrl = new URL("http://picasaweb.google.com/data/feed/api/user/username?kind=album"); UserFeed myUserFeed = myService.getFeed(feedUrl, UserFeed.class); for (AlbumEntry myAlbum : myUserFeed.getAlbumEntries()) { System.out.println(myAlbum.getTitle().getPlainText()); } Looking at source code you can look what getAlbumEntries is implemented by super.getEntries(AlbumEntry.class). But all entries is in another type GphotoEntry. So you can get them. You can use myUserFeed.getEntries(). But in future can be some issues. Also for one album getting I try to use: "http://picasaweb.google.com/data/feed/api/user/" + USER_NAME + "/albumid/" + albumId; but it's return few information. I can't get album name. I think the better decision is create own service.

No comments: