This is about gdata-samples.java-1.30.0.java, specifically,
samples.photos.PicasawebClient, function getAlbums(String username).


I can create photo album with Albums API, and I can manually create
albums.  But I can not list these albums with Albums API, and
therefore I can not insert pictures with albums API.  I traced the
code and the following is what I found in the code:

/**
   * Retrieves the albums for the given user.
   */
  public List<AlbumEntry> getAlbums(String username) throws
IOException,
      ServiceException {

    String albumUrl = API_PREFIX + username;
    //albumUrl = "http://picasaweb.google.com/david.ming.xia";;
    UserFeed userFeed = getFeed(albumUrl, UserFeed.class);

    List<GphotoEntry> entries = userFeed.getEntries();
<-------------- Here I got two entries, exactly as what I have.
    List<AlbumEntry> albums = new ArrayList<AlbumEntry>();
    for (GphotoEntry entry : entries) {
      GphotoEntry adapted = entry.getAdaptedEntry();  <--------------
Here adapted is actually a null object.

      if (adapted instanceof AlbumEntry) {
        albums.add((AlbumEntry) adapted);
      }
    }
    return
albums;
<------------------- This list is of 0 in size.
  }

So the problem is on getAdaptedEntry().

I would appreciate if someone can give me some help.

Thank you very much.

David

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to