如何使用JavaAPI从Picasa获取具有特定标题的照片

如何使用JavaAPI从Picasa获取具有特定标题的照片,java,api,photo,picasa,Java,Api,Photo,Picasa,有人知道如何在不知道照片所属的相册的情况下,通过标题从Picasa获得照片吗?我已经通过身份验证。我想你可以这样做:- URL baseSearchUrl = new URL("yourPicasaURL"); Query myQuery = new Query(baseSearchUrl); myQuery.setStringCustomParameter("kind", "photo"); myQuery.setMaxResults(10); myQuery.setFullTextQuer

有人知道如何在不知道照片所属的相册的情况下,通过标题从Picasa获得照片吗?我已经通过身份验证。

我想你可以这样做:-

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

我想你可以这样做:-

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