Skip to content

Commit 3109686

Browse files
new feature bulk ordering; new maven version 0.9
1 parent 70e8ef3 commit 3109686

File tree

2 files changed

+14
-3
lines changed

2 files changed

+14
-3
lines changed

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<groupId>com.keyworddesk.api</groupId>
88
<artifactId>keyworddesk-java</artifactId>
9-
<version>0.8</version>
9+
<version>0.9</version>
1010

1111
<dependencies>
1212
<dependency>

src/main/java/com/encircle360/keyworddesk/client/services/KeywordDeskApiService.java

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -348,8 +348,19 @@ public Boolean hasCredits() {
348348
* @return the job id of the created job for this request or null if request failed
349349
*/
350350
public String orderKeywordData(KeywordRequest keywordRequest) {
351+
ArrayList<KeywordRequest> keywordRequests = new ArrayList<KeywordRequest>();
352+
keywordRequests.add(keywordRequest);
353+
return this.orderKeywordData(keywordRequests);
354+
}
355+
356+
/**
357+
* 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.
358+
* @param keywordRequestList
359+
* @return the job id of the created job for this request or null if request failed
360+
*/
361+
public String orderKeywordData(ArrayList<KeywordRequest> keywordRequestList) {
351362

352-
String jsonString = JSONObject.fromObject(keywordRequest).toString();
363+
String jsonString = JSONArray.fromObject(keywordRequestList).toString();
353364
String jobId = null;
354365

355366
try {
@@ -365,7 +376,7 @@ public String orderKeywordData(KeywordRequest keywordRequest) {
365376
return jobId;
366377
}
367378

368-
public String getUrlApiLogin() {
379+
public String getUrlApiLogin() {
369380
return urlApiLogin;
370381
}
371382

0 commit comments

Comments
 (0)