I am trying to retrieve my albums through the PWA API. However I am
not very succesful.
I have the following code from the getting started guide:
URL feedUrl = new
URL("http://picasaweb.google.com/data/feed/api/
user/default?kind=album");
UserFeed myUserFeed = service.getFeed(feedUrl,
UserFeed.class);
for (AlbumEntry myAlbum : myUserFeed.getAlbumEntries())
{
System.out.println(myAlbum.getTitle().getPlainText());
}
When I run this I get nothing.
However when I change this to the following code:
URL feedUrl = new
URL("http://picasaweb.google.com/data/feed/api/
user/default?kind=album");
UserFeed myUserFeed = service.getFeed(feedUrl,
UserFeed.class);
for (GphotoEntry myAlbum : myUserFeed.getEntries()) {
System.out.println(myAlbum.getTitle().getPlainText());
}
I get the names of all my albums...
When I then try and convert these GphotoEntries into AlbumEntries
using the following code (from one of the samples I go back to
nothing:
List<GphotoEntry> entries = albumFeed.getEntries();
List<CommentEntry> comments = new ArrayList<CommentEntry>();
for (GphotoEntry entry : entries) {
GphotoEntry adapted = entry.getAdaptedEntry();
if (adapted instanceof CommentEntry) {
comments.add((CommentEntry) adapted);
}
}
Does anyone know how to succefully retrieve my albums?
--
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.