Skip to content

Commit

Permalink
new feature bulk ordering; new maven version 0.9
Browse files Browse the repository at this point in the history
  • Loading branch information
PatrickHuetter committed Jul 9, 2014
1 parent 70e8ef3 commit 3109686
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>com.keyworddesk.api</groupId>
<artifactId>keyworddesk-java</artifactId>
<version>0.8</version>
<version>0.9</version>

<dependencies>
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<KeywordRequest> keywordRequests = new ArrayList<KeywordRequest>();
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<KeywordRequest> keywordRequestList) {

String jsonString = JSONObject.fromObject(keywordRequest).toString();
String jsonString = JSONArray.fromObject(keywordRequestList).toString();
String jobId = null;

try {
Expand All @@ -365,7 +376,7 @@ public String orderKeywordData(KeywordRequest keywordRequest) {
return jobId;
}

public String getUrlApiLogin() {
public String getUrlApiLogin() {
return urlApiLogin;
}

Expand Down

0 comments on commit 3109686

Please sign in to comment.