forked from kevin.shehu/GGD
ADD: NEW CHANGES
FIX : Reworked ApiCall FIX : Reworked Rule Engine FIX : Reworked drl files
This commit is contained in:
@@ -3,7 +3,7 @@ package JSON_Unpack;
|
||||
|
||||
import Credentials.UserCredentials;
|
||||
import Files.WriteFile;
|
||||
import HttpCall.HttpCall;
|
||||
import HttpCall.HttpGet;
|
||||
import org.json.JSONArray;
|
||||
import org.json.JSONObject;
|
||||
|
||||
@@ -29,11 +29,11 @@ public class ReadSensors4Partner {
|
||||
|
||||
protected ArrayList<String> SensorRead(String cName, String token) throws Exception {
|
||||
UserCredentials userCredentials = new UserCredentials();
|
||||
HttpCall httpCall = new HttpCall();
|
||||
HttpGet httpCall = new HttpGet();
|
||||
WriteFile writingIntoFile = new WriteFile();
|
||||
|
||||
String baseURL = userCredentials.getBaseURL();
|
||||
String homeRoot = userCredentials.getHomeRoot();
|
||||
String homeRoot = UserCredentials.getHomeRoot();
|
||||
|
||||
BoxCall4Partner boxCall4Partner = new BoxCall4Partner();
|
||||
String outputBox = boxCall4Partner.FetchBox(cName,token);
|
||||
@@ -50,8 +50,7 @@ public class ReadSensors4Partner {
|
||||
String jsonTag = jsonobject.getString("tag");
|
||||
String finalTag = ","+par+"sensorTag"+par+":"+jsonTag+"}]";
|
||||
|
||||
|
||||
String sensorOutput = httpCall.HttpGet(baseURL + "sensors/" + jsonID + "/read" + "?access_token=" + token, token);
|
||||
String sensorOutput = httpCall.HttpGetCall(baseURL + "sensors/" + jsonID + "/read" + "?access_token=" + token, token);
|
||||
String modification = sensorOutput.replace("}]","");
|
||||
String finalSensorOutput = modification+finalTag;
|
||||
list.add(finalSensorOutput);
|
||||
@@ -59,7 +58,6 @@ public class ReadSensors4Partner {
|
||||
writingIntoFile.WriteFile(homeRoot + jsonID + ".json", sensorOutput + jsonTag);
|
||||
loopTerminator++;
|
||||
if(loopTerminator == jsonArray.length()){
|
||||
// System.out.println("L+++++++++++++"+list);
|
||||
return list;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user