From 3109686a21ffe075512a97eced16b572d68a2951 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrick=20H=C3=BCtter?= Date: Wed, 9 Jul 2014 20:10:22 +0200 Subject: [PATCH] new feature bulk ordering; new maven version 0.9 --- pom.xml | 2 +- .../client/services/KeywordDeskApiService.java | 15 +++++++++++++-- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/pom.xml b/pom.xml index c61a457..a02aab3 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ com.keyworddesk.api keyworddesk-java - 0.8 + 0.9 diff --git a/src/main/java/com/encircle360/keyworddesk/client/services/KeywordDeskApiService.java b/src/main/java/com/encircle360/keyworddesk/client/services/KeywordDeskApiService.java index e042f9f..4f2c40c 100644 --- a/src/main/java/com/encircle360/keyworddesk/client/services/KeywordDeskApiService.java +++ b/src/main/java/com/encircle360/keyworddesk/client/services/KeywordDeskApiService.java @@ -348,8 +348,19 @@ public Boolean hasCredits() { * @return the job id of the created job for this request or null if request failed */ public String orderKeywordData(KeywordRequest keywordRequest) { + ArrayList keywordRequests = new ArrayList(); + keywordRequests.add(keywordRequest); + return this.orderKeywordData(keywordRequests); + } + + /** + * Order keyword-data (or request refreshing of data) wich isn't in the keyworddesk database. You'll get a push notification to the url you specified in your api backend if the job is completed, so you don't need to pull the api. + * @param keywordRequestList + * @return the job id of the created job for this request or null if request failed + */ + public String orderKeywordData(ArrayList keywordRequestList) { - String jsonString = JSONObject.fromObject(keywordRequest).toString(); + String jsonString = JSONArray.fromObject(keywordRequestList).toString(); String jobId = null; try { @@ -365,7 +376,7 @@ public String orderKeywordData(KeywordRequest keywordRequest) { return jobId; } - public String getUrlApiLogin() { + public String getUrlApiLogin() { return urlApiLogin; }