How to get a photo with a certain title from Picasa using the Java API
Does anybody know how to get a photo from Picasa by its title without knowing 开发者_开发技巧the album it belongs to? I'm already authenticated.
I suppose you can do something like this:-
URL baseSearchUrl = new URL("yourPicasaURL");
Query myQuery = new Query(baseSearchUrl);
myQuery.setStringCustomParameter("kind", "photo");
myQuery.setMaxResults(10);
myQuery.setFullTextQuery("hello"); // search photo that has the word "hello"
AlbumFeed searchResultsFeed = myService.query(myQuery, AlbumFeed.class);
for (PhotoEntry photo : searchResultsFeed.getPhotoEntries()) {
System.out.println(photo.getTitle().getPlainText());
}
精彩评论