8696bb59f3eb4677baef832e85e2ddff62f55ea3
Zappy
This library provides limited interfaces to the Zappos REST API. Queries on the search, product, review, and image verbs are supported.
The Zappos API has reasonably complete documentation at the Zappos API Web site. You will need an API key (available for free upon request from Zappos).
Using the library
There is a class for each of the supported API search predicates:
- Search: search for products using a search term
- Product: get detailed information for up to 10 products at once, addressing them by SKU, UPC, or stock ID
- Review: get reviews for a product, addressing it by SKU
- Image: get URLs of images of a product, addressing it by SKU
The constructors for each of these classes take parameters for
your API key and any other information the API call needs (i.e.,
search terms or product IDs). Other parameters may be set using
their respective withXXX or withoutXXX methods.
Example: running a search
:::java
import dstu.zappy.Search;
public class SearchTest {
public static void main(String[] args) {
if (args.length != 3) {
System.err.println("Usage: SearchTest <API key> <search term> <maximum number of items to return>");
System.exit(-1);
}
String apiKey = args[0];
String searchTerm = args[1];
int itemLimit = Integer.parseInt(args[2]);
Search s = new Search(apiKey, searchTerm).withLimit(itemLimit);
System.out.println(s.get());
}
}
Copyright
All code herein is copyright 2012, all rights reserved.
Languages
Scala
100%