views:

14

answers:

1

I noticed that there are a few a classes such as CategoryFilter that can be used on the VolumeQuery in the Google Book Search Java API. Could this be used for only searching for specific kinds of books like textbooks, or is there a better approach to this kind of search? There doesn't seem to be too many examples online or details in the API for using the Google Book Search API in general, so I'm not too sure how to approach this. Thanks in advance.

A: 

CategoryFilter is used to search for books labelled by a user:

VolumeQuery query = new VolumeQuery(
    new URL("http://www.google.com/books/feeds/users/USER_ID/collections/library/volumes"));
CategoryFilter filter = new CategoryFilter();;
filter.addCategory(
    new Category(BooksCategory.Scheme.LABELS_SCHEME, "favorite"));
query.addCategoryFilter(filter);
VolumeFeed volumeFeed = service.query(query, VolumeFeed.class);

Ref: Data API: Developer's Guide, Java

Mitch Wheat