In meiner Web-Anwendung Parsen tun Amazon API 'itemLookup Wünsche, immer Antwort, zum Beispiel möchte ich auf amazon.com alle ASINs von "iPhone 7" zur Verfügung bekommen, sieht meine Anfrage wie folgt aus:Amazon API itemLookup response
public class Application {
public static void main(String[] args) {
List<String> foundASINs = new ArrayList<>();
Map<String, String> params = new HashMap<>();
params.put("Operation", "ItemSearch");
params.put("ResponseGroup", "ItemIds");
params.put("Keywords", "iphone 7");
params.put("SearchIndex", "Wireless");
AwsRequest request = new AwsRequest();
String res="";
try {
request.getRequest(params);
und AwsRequest Klasse:
public Document getRequest (Map<String, String> params) throws IOException, NoSuchAlgorithmException, InvalidKeyException, ParserConfigurationException, SAXException {
params.put("Service", "AWSECommerceService");
params.put("AssociateTag", ASSOCIATE_TAG);
params.put("Version", "2016-09-27");
SignedRequestsHelper helper = SignedRequestsHelper.getInstance(ENDPOINT, AWS_ACCESS_KEY_ID, AWS_SECRET_KEY);
String requestUrl = helper.sign(params);
DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
DocumentBuilder db = dbf.newDocumentBuilder();
doc = db.parse(requestUrl);
return doc;
}
so erhalte ich Antwort als XML-Dokument. Alles in Ordnung, aber ich frage mich, warum ich maximal 10 ASINs bekomme? Wenn ich die TotalResults-Eigenschaft des Dokuments überprüfe, muss es 10000+ Ergebnisse geben, aber als Antwort sehe ich nur 10? Wie kann ich andere bekommen?