Skip to content

Commit 883e24f

Browse files
Major update, most of the method signatures were changed to use
Map<String,Object> instead of a variable number of parameters where most of them could be null
1 parent cb471e5 commit 883e24f

File tree

14 files changed

+523
-357
lines changed

14 files changed

+523
-357
lines changed

src/main/java/com/ibm/watson/developer_cloud/concept_expansion/v1/ConceptExpansion.java

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,12 @@
4949
*/
5050
public class ConceptExpansion extends WatsonService {
5151

52+
public static final String SEEDS = "seeds";
53+
54+
public static final String DATASET = "dataset";
55+
56+
public static final String LABEL = "label";
57+
5258
/** The Constant PARAM_STATE. */
5359
private static final String PARAM_STATE = "state";
5460

@@ -125,9 +131,9 @@ public Job createJob(final String label, final String[] seeds) {
125131
}
126132

127133
JsonObject payload = new JsonObject();
128-
payload.addProperty("label", label);
129-
payload.addProperty("dataset", dataset.getId());
130-
payload.add("seeds",seedJsonArray);
134+
payload.addProperty(LABEL, label);
135+
payload.addProperty(DATASET, dataset.getId());
136+
payload.add(SEEDS,seedJsonArray);
131137

132138
HttpRequestBase request = Request.Post("/v1/upload")
133139
.withContent(payload).build();

0 commit comments

Comments
 (0)