开发者

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());
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜