Compare commits

...

2 Commits

Author SHA1 Message Date
adb
37caa0beac cleanup 2021-03-03 12:44:45 +01:00
adb
0c1b9f75e9 cleanup 2021-03-03 12:44:28 +01:00
2 changed files with 3 additions and 7 deletions

View File

@ -1,2 +1,2 @@
# sensorCommunityAPI
a simple java programm, which stores sensor data from https://sensor.community to json files
a simple java program, which stores sensor data from https://sensor.community to json files

View File

@ -8,16 +8,12 @@ public class Main {
public static void main(String[] args) throws IOException {
DataStore store = new DataStore();
JSONObject config = store.readJSON("config.json");
if (config == null){
config = store.readJSON("example.config.json");
}
if (config == null) config = store.readJSON("example.config.json");
DataStoreBot bot = new DataStoreBot(
config.get("storePath").toString(),
config.get("apiURL").toString()
);
bot.setInterval(Integer.parseInt(
config.get("interval").toString()
));
bot.setInterval((int)(long) config.get("interval"));
}
}