You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
655 B
24 lines
655 B
package sh.adb.sensorCommunityAPI;
|
|
|
|
import org.json.simple.JSONObject;
|
|
|
|
import java.io.IOException;
|
|
|
|
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");
|
|
}
|
|
|
|
DataStoreBot bot = new DataStoreBot(
|
|
config.get("storePath").toString(),
|
|
config.get("apiURL").toString()
|
|
);
|
|
bot.setInterval(Integer.parseInt(
|
|
config.get("interval").toString()
|
|
));
|
|
}
|
|
}
|