diff --git a/src/main/java/com/cloudius/urchin/api/APIClient.java b/src/main/java/com/cloudius/urchin/api/APIClient.java index c7b8cb1..f7f1c7e 100644 --- a/src/main/java/com/cloudius/urchin/api/APIClient.java +++ b/src/main/java/com/cloudius/urchin/api/APIClient.java @@ -352,9 +352,20 @@ public class APIClient { return null; } + public long[] getLongArrValue(String string, + MultivaluedMap queryParams) { + JsonReader reader = getReader(string, queryParams); + JsonArray arr = reader.readArray(); + long[] res = new long[arr.size()]; + for (int i = 0; i < arr.size(); i++) { + res[i] = arr.getJsonNumber(i).longValue(); + } + reader.close(); + return res; + } + public long[] getLongArrValue(String string) { - // TODO Auto-generated method stub - return null; + return getLongArrValue(string, null); } public Map getMapStringIntegerValue(String string) { @@ -396,7 +407,7 @@ public class APIClient { reader.close(); return map; } - + public Map getListMapStringLongValue(String string) { return getListMapStringLongValue(string, null); } @@ -411,7 +422,7 @@ public class APIClient { reader.close(); return res; } - + public JsonArray getJsonArray(String string) { return getJsonArray(string, null); }