Wrote a basic README.

This commit is contained in:
2012-04-27 19:29:50 -04:00
parent dcaff4b74f
commit 8696bb59f3

49
README.md Normal file
View File

@@ -0,0 +1,49 @@
# 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](http://developer.zappos.com/). 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.